@Override public boolean canReadTypeId() { return delegate.canReadTypeId(); } @Override public Object getObjectId() throws IOException { return delegate.getObjectId(); }
@Override public boolean canReadTypeId() { return delegate.canReadTypeId(); } @Override public Object getObjectId() throws IOException { return delegate.getObjectId(); }
/** * @since 2.7 */ public TokenBuffer(JsonParser p, DeserializationContext ctxt) { _objectCodec = p.getCodec(); _parentContext = p.getParsingContext(); _generatorFeatures = DEFAULT_GENERATOR_FEATURES; _writeContext = JsonWriteContext.createRootContext(null); // at first we have just one segment _first = _last = new Segment(); _appendAt = 0; _hasNativeTypeIds = p.canReadTypeId(); _hasNativeObjectIds = p.canReadObjectId(); _mayHaveNativeIds = _hasNativeTypeIds | _hasNativeObjectIds; _forceBigDecimal = (ctxt == null) ? false : ctxt.isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS); }
if (p.canReadTypeId()) { Object typeId = p.getTypeId(); if (typeId != null) {
if (p.canReadTypeId()) { Object typeId = p.getTypeId(); if (typeId != null) {
if (p.canReadTypeId()) { Object typeId = p.getTypeId(); if (typeId != null) {
protected Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { if (jp.canReadTypeId()) { Object typeId = jp.getTypeId(); if (typeId != null) { return _deserializeWithNativeTypeId(jp, ctxt, typeId); } } String typeId = _locateTypeId(jp, ctxt); JsonDeserializer<Object> deser = _findDeserializer(ctxt, typeId); if (_typeIdVisible && !_usesExternalId() && jp.getCurrentToken() == JsonToken.START_OBJECT) { TokenBuffer tb = new TokenBuffer(null, false); tb.writeStartObject(); tb.writeFieldName(_typePropertyName); tb.writeString(typeId); jp = JsonParserSequence.createFlattened(false, tb.asParser(jp), jp); jp.nextToken(); } Object value = deser.deserialize(jp, ctxt); return value; } }
@Override public boolean canReadTypeId() { return delegate.canReadTypeId(); } @Override public Object getObjectId() throws IOException, JsonGenerationException { return delegate.getObjectId(); }
@Override public boolean canReadTypeId() { return delegate.canReadTypeId(); } @Override public Object getObjectId() throws IOException { return delegate.getObjectId(); }
@Override public boolean canReadTypeId() { return delegate.canReadTypeId(); } @Override public Object getObjectId() throws IOException { return delegate.getObjectId(); }
@Override public boolean canReadTypeId() { return delegate.canReadTypeId(); } @Override public Object getObjectId() throws IOException, JsonGenerationException { return delegate.getObjectId(); }
/** * @since 2.3 */ public TokenBuffer(JsonParser jp) { _objectCodec = jp.getCodec(); _generatorFeatures = DEFAULT_GENERATOR_FEATURES; _writeContext = JsonWriteContext.createRootContext(null); // at first we have just one segment _first = _last = new Segment(); _appendAt = 0; _hasNativeTypeIds = jp.canReadTypeId(); _hasNativeObjectIds = jp.canReadObjectId(); _mayHaveNativeIds = _hasNativeTypeIds | _hasNativeObjectIds; }
/** * @since 2.3 */ public TokenBuffer(JsonParser jp) { _objectCodec = jp.getCodec(); _generatorFeatures = DEFAULT_GENERATOR_FEATURES; _writeContext = JsonWriteContext.createRootContext(null); // at first we have just one segment _first = _last = new Segment(); _appendAt = 0; _hasNativeTypeIds = jp.canReadTypeId(); _hasNativeObjectIds = jp.canReadObjectId(); _mayHaveNativeIds = _hasNativeTypeIds | _hasNativeObjectIds; }
/** * @since 2.7 */ public TokenBuffer(JsonParser p, DeserializationContext ctxt) { _objectCodec = p.getCodec(); _generatorFeatures = DEFAULT_GENERATOR_FEATURES; _writeContext = JsonWriteContext.createRootContext(null); // at first we have just one segment _first = _last = new Segment(); _appendAt = 0; _hasNativeTypeIds = p.canReadTypeId(); _hasNativeObjectIds = p.canReadObjectId(); _mayHaveNativeIds = _hasNativeTypeIds | _hasNativeObjectIds; _forceBigDecimal = (ctxt == null) ? false : ctxt.isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS); }
@Override public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { // Make sure we have a native type ID *AND* that we can resolve it to a type; otherwise, we'll end up in a recursive loop if (p.canReadTypeId()) { Object typeId = p.getTypeId(); if (typeId != null) { if (_typeDeserializer != null) { TypeIdResolver resolver = _typeDeserializer.getTypeIdResolver(); if (resolver != null && resolver.typeFromId(ctxt, typeId.toString()) != null) { return _typeDeserializer.deserializeTypedFromAny(p, ctxt); } } } } return super.deserialize(p, ctxt); }
/** * @since 2.7 */ public TokenBuffer(JsonParser p, DeserializationContext ctxt) { _objectCodec = p.getCodec(); _parentContext = p.getParsingContext(); _generatorFeatures = DEFAULT_GENERATOR_FEATURES; _writeContext = JsonWriteContext.createRootContext(null); // at first we have just one segment _first = _last = new Segment(); _appendAt = 0; _hasNativeTypeIds = p.canReadTypeId(); _hasNativeObjectIds = p.canReadObjectId(); _mayHaveNativeIds = _hasNativeTypeIds | _hasNativeObjectIds; _forceBigDecimal = (ctxt == null) ? false : ctxt.isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS); }
@Override public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException { // Use type deserializer if we have type information, even for scalar values if (typeDeserializer != null) { if (p.canReadTypeId()) { Object typeId = p.getTypeId(); if (typeId != null) { TypeIdResolver resolver = typeDeserializer.getTypeIdResolver(); // Make sure that we actually can resolve the type ID, otherwise we'll end up in a recursive loop if (resolver != null && resolver.typeFromId(ctxt, p.getTypeId().toString()) != null) { return typeDeserializer.deserializeTypedFromAny(p, ctxt); } } } } return super.deserializeWithType(p, ctxt, typeDeserializer); }
protected Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { if (jp.canReadTypeId()) { Object typeId = jp.getTypeId(); if (typeId != null) { return _deserializeWithNativeTypeId(jp, ctxt, typeId); } } String typeId = _locateTypeId(jp, ctxt); JsonDeserializer<Object> deser = _findDeserializer(ctxt, typeId); if (_typeIdVisible && !_usesExternalId() && jp.getCurrentToken() == JsonToken.START_OBJECT) { TokenBuffer tb = new TokenBuffer(null, false); tb.writeStartObject(); tb.writeFieldName(_typePropertyName); tb.writeString(typeId); jp = JsonParserSequence.createFlattened(false, tb.asParser(jp), jp); jp.nextToken(); } Object value = deser.deserialize(jp, ctxt); return value; } }
protected Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { if (jp.canReadTypeId()) { Object typeId = jp.getTypeId(); if (typeId != null) { return _deserializeWithNativeTypeId(jp, ctxt, typeId); } } String typeId = _locateTypeId(jp, ctxt); JsonDeserializer<Object> deser = _findDeserializer(ctxt, typeId); if (_typeIdVisible && !_usesExternalId() && jp.getCurrentToken() == JsonToken.START_OBJECT) { TokenBuffer tb = new TokenBuffer(null, false); tb.writeStartObject(); tb.writeFieldName(_typePropertyName); tb.writeString(typeId); jp = JsonParserSequence.createFlattened(tb.asParser(jp), jp); jp.nextToken(); } Object value = deser.deserialize(jp, ctxt); return value; } }
protected Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { if (jp.canReadTypeId()) { Object typeId = jp.getTypeId(); if (typeId != null) { return _deserializeWithNativeTypeId(jp, ctxt, typeId); } } String typeId = _locateTypeId(jp, ctxt); JsonDeserializer<Object> deser = _findDeserializer(ctxt, typeId); if (_typeIdVisible && !_usesExternalId() && jp.getCurrentToken() == JsonToken.START_OBJECT) { TokenBuffer tb = new TokenBuffer(null, false); tb.writeStartObject(); tb.writeFieldName(_typePropertyName); tb.writeString(typeId); jp = JsonParserSequence.createFlattened(tb.asParser(jp), jp); jp.nextToken(); } Object value = deser.deserialize(jp, ctxt); return value; } }