Closed GoogleCodeExporter closed 9 years ago
Issue 312 has been merged into this issue.
Original comment by inder123
on 3 Jun 2011 at 6:33
The feature requester wanted to do this:
String value = element.get("mystructure.myArray[3].myproperty");
I recommend that they just use the Java APIs:
element.getAsJsonObject().get("mystructure")
.getAsJsonObject().get("myArray")
.getAsJsonArray().get(3)
.getAsJsonObject().get("myproperty");
I admit that it's more verbose, but it's type safe and it will fail with a much
more meaningful error.
Original comment by limpbizkit
on 1 Jul 2011 at 9:51
essentially defeats the intent of the original request - to have an xpath like
construct.
Original comment by javadba@gmail.com
on 7 Apr 2013 at 2:15
a meaningful error is not at all difficult in case of of failure
moreover all the convenience methods of getString and the like still make sense
the feature originally described would make the library useful in a whole class
of problems where json is a good enough structure for working with data and
doing Java<->Json is not necessary
Original comment by un...@webgress.com
on 5 Mar 2014 at 2:33
Original issue reported on code.google.com by
inder123
on 8 May 2011 at 8:20