For example, I have such JSON
{
"profile": {
"name": "George",
"address": {
"home": "@ubuntu"
}
}
}
when I call JsonPath.parse(jsonText)?.read<String>("$.profile.address") it returns null. Instead return the object:
[
{
"home": "@ubuntu"
}
]
My usecase is that there is a website im scraping, which returns huge JSON, but I dont want models for all the objects. If I could get those small snippets of JSON then I would be able to serialize them into smaller more useful models.
For example, I have such JSON
{ "profile": { "name": "George", "address": { "home": "@ubuntu" } } }when I call
JsonPath.parse(jsonText)?.read<String>("$.profile.address")it returns null. Instead return the object:[ { "home": "@ubuntu" } ]My usecase is that there is a website im scraping, which returns huge JSON, but I dont want models for all the objects. If I could get those small snippets of JSON then I would be able to serialize them into smaller more useful models.