Is there a way to parse a JsonObject as part of pa...
# klaxon
k
Is there a way to parse a JsonObject as part of parsing with the object mapper? Something like this:
Copy code
data class Foo(val a: JsonObject)

fun main(args: Array<String>) {
	val json = """{ "a": { "hello": "world" } }"""

	val result = Klaxon().parse<Foo>(json)
	println(result)
}
s
are you looking for
Klaxon.parseJsonObject(String)
, or am I misunderstanding you
Ohh, I see what you mean, my bad - I actually tried doing something like this not too long ago and also couldn’t get the
JsonObject
members to work intuitively
k
It's probably possible to register a custom parser for
JsonObject
that just returns the json itself, I'll look into that.