How can I read a "complex" json using Klaxon? I'm trying to use klaxon's stream api as documentation say .
I'm using the beginObject method. If I use a json as given in the example everything is fine
val objectString = """{
"name" : "Joe",
"age" : 23,
"flag" : true,
"array" : [1, 3],
"obj1" : { "a" : 1, "b" : 2 }
}"""
But if I try to parse a json with a nested object as the following example I get the following error: "Expected a name but got LEFT_BRACE"
val objectString = """{
"name" : "Joe",
"age" : 23,
"flag" : true,
"array" : [1, 3],
"obj1" : {
"hello": { "a" : 1, "b" : 2 }
}
}"""
I don't see any reported issues in the github repo, so I wonder if there is a way to get this working.
cheers