Why oh why... If it helps JSON invade the enterprise then ok, but why make a good thing bad.
To allow you to use XSLT tools apparently.
x.person.addresses[0].city?
I guess XPath is easier when you probably have to do something like this: JSONObject json = (JSONObject) JSONSerializer.toJSON( jsonTxt )
String city = json.getJSONObject("person").getJSONArray("addresses").getJSONObject(0).getJSONObject("city");
Or however you'd do it in Java. //person[@alive="true"]/pets//dog[@hair="long"]/*/flea[@name]JSON stands for Javascript Object Notation.
In Java the equivalent would simply be serialization.
NB: if XSLT and XPath is the solution, you've already lost.
(edited for relevance)
I mean, it's not something you'd want to use all over the place, but there are situations where it might come in handy.