I tried the tutorial of json spray but i have a different string where one value is a string and the other one is a list. How do i convert the following string into a json object where each key is either a list or a string?
source = """{ "some": "JSON source", "kuku":["fu"] }"""
I wrote a short snipped of code but cannot continue from here:
val source = """{ "some": "JSON source", "kuku":["fu"] }"""
val jsonAst = source.asJson
val kuku = jsonAst.convertTo[?]
println(kuku)
If i cannot, how do i get the value of the key some(hopefully without regular expression) I would prefer to avoid creating a specific object for it, because there are certain keys which can change.
Thanks, David