Closed GoogleCodeExporter closed 9 years ago
Fixed and will be part of 0.9.0 release.
@Test
public void issue_36() {
String json = "{\n" +
"\n" +
" \"arrayOfObjectsAndArrays\" : [ { \"k\" : [\"json\"] }, { \"k\":[\"path\"] }, { \"k\" : [\"is\"] }, { \"k\" : [\"cool\"] } ],\n" +
"\n" +
" \"arrayOfObjects\" : [{\"k\" : \"json\"}, {\"k\":\"path\"}, {\"k\" : \"is\"}, {\"k\" : \"cool\"}]\n" +
"\n" +
" }";
Object o1 = JsonPath.read(json, "$.arrayOfObjectsAndArrays..k ");
Object o2 = JsonPath.read(json, "$.arrayOfObjects..k ");
assertEquals("[[\"json\"],[\"path\"],[\"is\"],[\"cool\"]]", o1.toString());
assertEquals("[\"json\",\"path\",\"is\",\"cool\"]", o2.toString());
}
Original comment by kalle.st...@gmail.com
on 18 Sep 2013 at 5:40
Original issue reported on code.google.com by
michelbe...@gmail.com
on 18 Sep 2013 at 3:19