@Override public Object getTypeId() throws IOException { return delegate.getTypeId(); } }
@Override public Object getTypeId() throws IOException { return delegate.getTypeId(); } }
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids. Assumption from there is that only native * type ids are to be used. * * @since 2.3 */ @Deprecated protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt) throws IOException { return _deserializeWithNativeTypeId(jp, ctxt, jp.getTypeId()); }
private final void _checkNativeIds(JsonParser jp) throws IOException { if ((_typeId = jp.getTypeId()) != null) { _hasNativeId = true; } if ((_objectId = jp.getObjectId()) != null) { _hasNativeId = true; } }
Object typeId = p.getTypeId(); if (typeId != null) { return _deserializeWithNativeTypeId(p, ctxt, typeId);
Object typeId = p.getTypeId(); if (typeId != null) { return _deserializeWithNativeTypeId(p, ctxt, typeId);
Object typeId = p.getTypeId(); if (typeId != null) { return _deserializeWithNativeTypeId(p, ctxt, typeId);
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 Object getTypeId() throws IOException, JsonGenerationException { return delegate.getTypeId(); } }
@Override public Object getTypeId() throws IOException, JsonGenerationException { return delegate.getTypeId(); } }
/** * {@link JsonParser#getTypeId()} exists since Jackson 2.3 */ static Object getTypeId(JsonParser jp) throws IOException { if (supportsTypeId) try { return jp.getTypeId(); } catch (LinkageError le) { LOGGER.log(Level.FINEST, "JsonParser.getTypeId() unavailable. Using Jackson < 2.3?", le); supportsTypeId = false; } return null; }
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids. Assumption from there is that only native * type ids are to be used. * * @since 2.3 */ @Deprecated protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt) throws IOException { return _deserializeWithNativeTypeId(jp, ctxt, jp.getTypeId()); }
private final void _checkNativeIds(JsonParser jp) throws IOException, JsonProcessingException { if ((_typeId = jp.getTypeId()) != null) { _hasNativeId = true; } if ((_objectId = jp.getObjectId()) != null) { _hasNativeId = true; } }
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids. Assumption from there is that only native * type ids are to be used. * * @since 2.3 */ @Deprecated protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt) throws IOException { return _deserializeWithNativeTypeId(jp, ctxt, jp.getTypeId()); }
private final void _checkNativeIds(JsonParser jp) throws IOException { if ((_typeId = jp.getTypeId()) != null) { _hasNativeId = true; } if ((_objectId = jp.getObjectId()) != null) { _hasNativeId = true; } }
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids. Assumption from there is that only native * type ids are to be used. * * @since 2.3 */ @Deprecated protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt) throws IOException { return _deserializeWithNativeTypeId(jp, ctxt, jp.getTypeId()); }
private final void _checkNativeIds(JsonParser jp) throws IOException { if ((_typeId = jp.getTypeId()) != null) { _hasNativeId = true; } if ((_objectId = jp.getObjectId()) != null) { _hasNativeId = true; } }
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids. Assumption from there is that only native * type ids are to be used. * * @since 2.3 */ @Deprecated protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt) throws IOException { return _deserializeWithNativeTypeId(jp, ctxt, jp.getTypeId()); }
private final void _checkNativeIds(JsonParser jp) throws IOException, JsonProcessingException { if ((_typeId = jp.getTypeId()) != null) { _hasNativeId = true; } if ((_objectId = jp.getObjectId()) != null) { _hasNativeId = true; } }
@Override public Object deserializeTypedFromAny(JsonParser p, DeserializationContext ctxt) throws IOException { if (p.getTypeId() == null && getDefaultImpl() == null) { JsonDeserializer<Object> deser = _findDeserializer(ctxt, AvroSchemaHelper.getTypeId(_baseType)); if (deser == null) { ctxt.reportInputMismatch(_baseType, "No (native) type id found when one was expected for polymorphic type handling"); return null; } return deser.deserialize(p, ctxt); } return _deserializeWithNativeTypeId(p, ctxt, p.getTypeId()); }