Let’s say you have some nested json objects.
And you want to retrieve some inner values without deserializing the entire thing into java objects.
What would be the best way?
Let me re-emphasize I do not want to deserialize the entire json objects into java objects.
I just want to fish some values out.
This library can help you do that:
http://x-stream.github.io/javadoc/com/thoughtworks/xstream/io/json/JsonHierarchicalStreamDriver.html
Create yourself a reader using one of the factory methods:
http://x-stream.github.io/javadoc/com/thoughtworks/xstream/io/HierarchicalStreamReader.html
And then use the moveDown/moveUp methods to find the spot(s) of interest, and fish out your values.