/** * Method called to create a new context for iterating all * contents of the current structured value (JSON array or object) */ public final NodeCursor iterateChildren() { JsonNode n = currentNode(); if (n == null) throw new IllegalStateException("No current node"); if (n.isArray()) { // false since we have already returned START_ARRAY return new ArrayCursor(n, this); } if (n.isObject()) { return new ObjectCursor(n, this); } throw new IllegalStateException("Current node of type "+n.getClass().getName()); }
/** * Method called to create a new context for iterating all * contents of the current structured value (JSON array or object) */ public final NodeCursor iterateChildren() { JsonNode n = currentNode(); if (n == null) throw new IllegalStateException("No current node"); if (n.isArray()) { // false since we have already returned START_ARRAY return new ArrayCursor(n, this); } if (n.isObject()) { return new ObjectCursor(n, this); } throw new IllegalStateException("Current node of type "+n.getClass().getName()); }
/** * Method called to create a new context for iterating all * contents of the current structured value (JSON array or object) */ public final NodeCursor iterateChildren() { JsonNode n = currentNode(); if (n == null) throw new IllegalStateException("No current node"); if (n.isArray()) { // false since we have already returned START_ARRAY return new ArrayCursor(n, this); } if (n.isObject()) { return new ObjectCursor(n, this); } throw new IllegalStateException("Current node of type "+n.getClass().getName()); }
/** * Method called to create a new context for iterating all * contents of the current structured value (JSON array or object) */ public final NodeCursor iterateChildren() { JsonNode n = currentNode(); if (n == null) throw new IllegalStateException("No current node"); if (n.isArray()) { // false since we have already returned START_ARRAY return new ArrayCursor(n, this); } if (n.isObject()) { return new ObjectCursor(n, this); } throw new IllegalStateException("Current node of type "+n.getClass().getName()); }
public TreeTraversingParser(JsonNode n, ObjectCodec codec) { super(0); _objectCodec = codec; if (n.isArray()) { _nextToken = JsonToken.START_ARRAY; _nodeCursor = new NodeCursor.ArrayCursor(n, null); } else if (n.isObject()) { _nextToken = JsonToken.START_OBJECT; _nodeCursor = new NodeCursor.ObjectCursor(n, null); } else { // value node _nodeCursor = new NodeCursor.RootCursor(n, null); } }
public TreeTraversingParser(JsonNode n, ObjectCodec codec) { super(0); _objectCodec = codec; if (n.isArray()) { _nextToken = JsonToken.START_ARRAY; _nodeCursor = new NodeCursor.ArrayCursor(n, null); } else if (n.isObject()) { _nextToken = JsonToken.START_OBJECT; _nodeCursor = new NodeCursor.ObjectCursor(n, null); } else { // value node _nodeCursor = new NodeCursor.RootCursor(n, null); } }
public TreeTraversingParser(JsonNode n, ObjectCodec codec) { super(0); _objectCodec = codec; if (n.isArray()) { _nextToken = JsonToken.START_ARRAY; _nodeCursor = new NodeCursor.ArrayCursor(n, null); } else if (n.isObject()) { _nextToken = JsonToken.START_OBJECT; _nodeCursor = new NodeCursor.ObjectCursor(n, null); } else { // value node _nodeCursor = new NodeCursor.RootCursor(n, null); } }
/** * Method called to create a new context for iterating all * contents of the current structured value (JSON array or object) */ public final NodeCursor iterateChildren() { JsonNode n = currentNode(); if (n == null) throw new IllegalStateException("No current node"); if (n.isArray()) { // false since we have already returned START_ARRAY return new ArrayCursor(n, this); } if (n.isObject()) { return new ObjectCursor(n, this); } throw new IllegalStateException("Current node of type "+n.getClass().getName()); }
public TreeTraversingParser(JsonNode n, ObjectCodec codec) { super(0); _objectCodec = codec; if (n.isArray()) { _nextToken = JsonToken.START_ARRAY; _nodeCursor = new NodeCursor.ArrayCursor(n, null); } else if (n.isObject()) { _nextToken = JsonToken.START_OBJECT; _nodeCursor = new NodeCursor.ObjectCursor(n, null); } else { // value node _nodeCursor = new NodeCursor.RootCursor(n, null); } }
@Override public boolean currentHasChildren() { // note: ONLY to be called for container nodes return ((ContainerNode<?>) currentNode()).size() > 0; } }
@Override public boolean currentHasChildren() { // note: ONLY to be called for container nodes return ((ContainerNode<?>) currentNode()).size() > 0; } }
@Override public boolean currentHasChildren() { // note: ONLY to be called for container nodes return ((ContainerNode<?>) currentNode()).size() > 0; } }
@Override public boolean currentHasChildren() { // note: ONLY to be called for container nodes return ((ContainerNode<?>) currentNode()).size() > 0; } }
public TreeTraversingParser(JsonNode n, ObjectCodec codec) { super(0); _objectCodec = codec; if (n.isArray()) { _nextToken = JsonToken.START_ARRAY; _nodeCursor = new NodeCursor.ArrayCursor(n, null); } else if (n.isObject()) { _nextToken = JsonToken.START_OBJECT; _nodeCursor = new NodeCursor.ObjectCursor(n, null); } else { // value node _nodeCursor = new NodeCursor.RootCursor(n, null); } }
@Override public boolean currentHasChildren() { // note: ONLY to be called for container nodes return ((ContainerNode<?>) currentNode()).size() > 0; } }