Description
We have a JSON response, that has some properties that have a value of "false", but other properties are OK. When iterating on all the nodes, the mentioned ones are ignored.
See code below. When run, only the second node is printed. Changing the first "false" to "true" causes the first node to be printed as well.
Is it a bug, or do we miss something in the format?
Thanks
public void testJXPathIssue() {
final String result = "{\"abc\":\"12:34\",\"vs\":[" +
"
," +
"
]}";
Reader reader = new StringReader(result);
Object obj = null;
try {
obj = JSONValue.parseWithException(reader);
CompiledExpression exp = JXPathContext.compile("./vs[*]");
JXPathContext xpathRootContext = JXPathContext.newContext(obj);
Iterator i = exp.iteratePointers(xpathRootContext);
while (i.hasNext())
} catch (IOException e)
{ e.printStackTrace(); } catch (ParseException e) { e.printStackTrace(); }}
Attachments
Issue Links
- is related to
-
JXPATH-164 jxpath returns the wrong number of entries if a map contains an empty string value
- Open