@Override public String absoluteName() { List<String> tree = new ArrayList<String>(); for (JsonStreamContext ctx = parser.getParsingContext(); ctx != null; ctx = ctx.getParent()) { if (ctx.inObject()) { tree.add(ctx.getCurrentName()); } } StringBuilder sb = new StringBuilder(); for (int index = tree.size(); index > 0; index--) { sb.append(tree.get(index - 1)); sb.append("."); } // remove the last . sb.setLength(sb.length() - 1); return sb.toString(); }
@SuppressWarnings("unchecked") protected BackportedJacksonMappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser) { _type = type; _parser = jp; _context = ctxt; _deserializer = (JsonDeserializer<T>) deser; /* One more thing: if we are at START_ARRAY (but NOT root-level * one!), advance to next token (to allow matching END_ARRAY) */ if (jp != null && jp.getCurrentToken() == JsonToken.START_ARRAY) { JsonStreamContext sc = jp.getParsingContext(); // safest way to skip current token is to clear it (so we'll advance soon) if (!sc.inRoot()) { jp.clearCurrentToken(); } } }
public JsonStreamContext getOutputContext() { return this.delegate.getOutputContext(); }
public JsonStreamContext getParsingContext() { return this._parsingContext; }
public JsonStreamContext getParsingContext() { return this.delegate.getParsingContext(); }
public JsonStreamContext getParsingContext() { return this._nodeCursor; }
@Override public JsonStreamContext getOutputContext() { return delegate.getOutputContext(); }
public abstract JsonStreamContext getParsingContext();
@Override public JsonStreamContext getParsingContext() {throw new UnsupportedOperationException("Not required for tests.");}