dacr / json2props

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

GitHub

json2props Build Status License Codacy codecov

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

Latest version: Maven Scaladex