/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids, and such type id has been found. * * @since 2.4 */ protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt, Object typeId) throws IOException { JsonDeserializer<Object> deser; if (typeId == null) { /* 04-May-2014, tatu: Should error be obligatory, or should there be another method * for "try to deserialize with native tpye id"? */ deser = _findDefaultImplDeserializer(ctxt); if (deser == null) { return ctxt.reportInputMismatch(baseType(), "No (native) type id found when one was expected for polymorphic type handling"); } } else { String typeIdStr = (typeId instanceof String) ? (String) typeId : String.valueOf(typeId); deser = _findDeserializer(ctxt, typeIdStr); } return deser.deserialize(jp, ctxt); }
if (type == null) { deser = _findDefaultImplDeserializer(ctxt); if (deser == null) {
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids, and such type id has been found. * * @since 2.4 */ protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt, Object typeId) throws IOException { JsonDeserializer<Object> deser; if (typeId == null) { /* 04-May-2014, tatu: Should error be obligatory, or should there be another method * for "try to deserialize with native tpye id"? */ deser = _findDefaultImplDeserializer(ctxt); if (deser == null) { throw ctxt.mappingException("No (native) type id found when one was expected for polymorphic type handling"); } } else { String typeIdStr = (typeId instanceof String) ? (String) typeId : String.valueOf(typeId); deser = _findDeserializer(ctxt, typeIdStr); } return deser.deserialize(jp, ctxt); }
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids, and such type id has been found. * * @since 2.4 */ protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt, Object typeId) throws IOException { JsonDeserializer<Object> deser; if (typeId == null) { /* 04-May-2014, tatu: Should error be obligatory, or should there be another method * for "try to deserialize with native tpye id"? */ deser = _findDefaultImplDeserializer(ctxt); if (deser == null) { throw ctxt.mappingException("No (native) type id found when one was expected for polymorphic type handling"); } } else { String typeIdStr = (typeId instanceof String) ? (String) typeId : String.valueOf(typeId); deser = _findDeserializer(ctxt, typeIdStr); } return deser.deserialize(jp, ctxt); }
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids, and such type id has been found. * * @since 2.4 */ protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt, Object typeId) throws IOException { JsonDeserializer<Object> deser; if (typeId == null) { /* 04-May-2014, tatu: Should error be obligatory, or should there be another method * for "try to deserialize with native tpye id"? */ deser = _findDefaultImplDeserializer(ctxt); if (deser == null) { ctxt.reportMappingException("No (native) type id found when one was expected for polymorphic type handling"); return null; } } else { String typeIdStr = (typeId instanceof String) ? (String) typeId : String.valueOf(typeId); deser = _findDeserializer(ctxt, typeIdStr); } return deser.deserialize(jp, ctxt); }
throw ctxt.unknownTypeException(_baseType, typeId); deser = _findDefaultImplDeserializer(ctxt); } else {
throw ctxt.unknownTypeException(_baseType, typeId); deser = _findDefaultImplDeserializer(ctxt); } else {
if (type == null) { deser = _findDefaultImplDeserializer(ctxt); if (deser == null) { deser = _handleUnknownTypeId(ctxt, typeId, _idResolver, _baseType);
if (type == null) { deser = _findDefaultImplDeserializer(ctxt); if (deser == null) { deser = _handleUnknownTypeId(ctxt, typeId, _idResolver, _baseType);
/** * Helper method called when {@link JsonParser} indicates that it can use * so-called native type ids, and such type id has been found. * * @since 2.4 */ protected Object _deserializeWithNativeTypeId(JsonParser jp, DeserializationContext ctxt, Object typeId) throws IOException { JsonDeserializer<Object> deser; if (typeId == null) { /* 04-May-2014, tatu: Should error be obligatory, or should there be another method * for "try to deserialize with native tpye id"? */ deser = _findDefaultImplDeserializer(ctxt); if (deser == null) { return ctxt.reportInputMismatch(baseType(), "No (native) type id found when one was expected for polymorphic type handling"); } } else { String typeIdStr = (typeId instanceof String) ? (String) typeId : String.valueOf(typeId); deser = _findDeserializer(ctxt, typeIdStr); } return deser.deserialize(jp, ctxt); }
if (type == null) { deser = _findDefaultImplDeserializer(ctxt); if (deser == null) {
if (type == null) { deser = _findDefaultImplDeserializer(ctxt); if (deser == null) {