3637383940414243
public JsonNode current() { return parentStack.isEmpty() ? null : parentStack.peek(); } public boolean isSimpleArray() { JsonNode node = current(); return node instanceof ArrayNode && ((ArrayNode) node).isSimpleForm(); }
454647484950515253545556
public JsonNode down() { if (parentStack.isEmpty()) { pushNewParent(root); return root; } else { JsonNode parent = parentStack.peek(); JsonNode child = parent.firstChild(); if (child != null) { pushNewParent(child); } return child; }
606162636465666768697071
parentStack.push(p); childStack.push(null); } public void startField() { JsonNode parent = parentStack.peek(); JsonNode child = childStack.pop(); if (child == null) { child = parent.firstChild(); } else { child = parent.nextChild(child); }
858687888990919293949596
endField(); } } public void scalarArrayItem() { JsonNode parent = parentStack.peek(); JsonNode child = childStack.pop(); if (child == null) { child = parent.firstChild(); } else { child = parent.nextChild(child); }
979899100101102103104
childStack.push(child); } @Override public String toString() { JsonNode n = current(); return n == null ? "[null]" : n.toString(); }