dacr / json2props   1.0.1

GitHub

hack to translate some JSON data to properties like data (key-value)

Scala versions: 3.x 2.13 2.12 2.11 2.10

json2props Build Status License Maven Scaladex

JSON flattened into key value pairs.

JSon2Properties.flattenJSon function flatten a JSon tree into a map of pairs.

{"a" : 1 } becomes Map("a"->1)
{"a" : { "b" : 1 } } becomes Map("a.b" -> 1)
{"a" : { "b" : [100, 200] } } becomes Map("a.b.0" -> 100, "a.b.1" -> 200)

In your build.sbt, add this :

libraryDependencies += "fr.janalyse" %% "json2props" % version