/** * Helper method used to check if given parser might be pointing to * a "natural" value, and one that would be acceptable as the * result value (compatible with declared base type) */ public static Object deserializeIfNatural(JsonParser p, DeserializationContext ctxt, JavaType baseType) throws IOException { return deserializeIfNatural(p, ctxt, baseType.getRawClass()); }
if (deser == null) { Object result = TypeDeserializer.deserializeIfNatural(p, ctxt, _baseType); if (result != null) { return result;
buffered.nextToken(); SettableBeanProperty extProp = _properties[i].getProperty(); Object result = TypeDeserializer.deserializeIfNatural(buffered, ctxt, extProp.getType()); if (result != null) { extProp.set(bean, result);
/** * Helper method used to check if given parser might be pointing to * a "natural" value, and one that would be acceptable as the * result value (compatible with declared base type) */ public static Object deserializeIfNatural(JsonParser jp, DeserializationContext ctxt, JavaType baseType) throws IOException { return deserializeIfNatural(jp, ctxt, baseType.getRawClass()); }
/** * Helper method used to check if given parser might be pointing to * a "natural" value, and one that would be acceptable as the * result value (compatible with declared base type) */ public static Object deserializeIfNatural(JsonParser p, DeserializationContext ctxt, JavaType baseType) throws IOException { return deserializeIfNatural(p, ctxt, baseType.getRawClass()); }
/** * Helper method used to check if given parser might be pointing to * a "natural" value, and one that would be acceptable as the * result value (compatible with declared base type) */ public static Object deserializeIfNatural(JsonParser p, DeserializationContext ctxt, JavaType baseType) throws IOException { return deserializeIfNatural(p, ctxt, baseType.getRawClass()); }
/** * Helper method used to check if given parser might be pointing to * a "natural" value, and one that would be acceptable as the * result value (compatible with declared base type) */ public static Object deserializeIfNatural(JsonParser jp, DeserializationContext ctxt, JavaType baseType) throws IOException { return deserializeIfNatural(jp, ctxt, baseType.getRawClass()); }
@SuppressWarnings("resource") protected Object _deserializeTypedUsingDefaultImpl(JsonParser jp, DeserializationContext ctxt, TokenBuffer tb) throws IOException { // As per [JACKSON-614], may have default implementation to use JsonDeserializer<Object> deser = _findDefaultImplDeserializer(ctxt); if (deser != null) { if (tb != null) { tb.writeEndObject(); jp = tb.asParser(jp); // must move to point to the first token: jp.nextToken(); } return deser.deserialize(jp, ctxt); } // or, perhaps we just bumped into a "natural" value (boolean/int/double/String)? Object result = TypeDeserializer.deserializeIfNatural(jp, ctxt, _baseType); if (result != null) { return result; } // or, something for which "as-property" won't work, changed into "wrapper-array" type: if (jp.getCurrentToken() == JsonToken.START_ARRAY) { return super.deserializeTypedFromAny(jp, ctxt); } throw ctxt.wrongTokenException(jp, JsonToken.FIELD_NAME, "missing property '"+_typePropertyName+"' that is to contain type id (for class "+baseTypeName()+")"); }
@SuppressWarnings("resource") protected Object _deserializeTypedUsingDefaultImpl(JsonParser jp, DeserializationContext ctxt, TokenBuffer tb) throws IOException { // As per [JACKSON-614], may have default implementation to use JsonDeserializer<Object> deser = _findDefaultImplDeserializer(ctxt); if (deser != null) { if (tb != null) { tb.writeEndObject(); jp = tb.asParser(jp); // must move to point to the first token: jp.nextToken(); } return deser.deserialize(jp, ctxt); } // or, perhaps we just bumped into a "natural" value (boolean/int/double/String)? Object result = TypeDeserializer.deserializeIfNatural(jp, ctxt, _baseType); if (result != null) { return result; } // or, something for which "as-property" won't work, changed into "wrapper-array" type: if (jp.getCurrentToken() == JsonToken.START_ARRAY) { return super.deserializeTypedFromAny(jp, ctxt); } throw ctxt.wrongTokenException(jp, JsonToken.FIELD_NAME, "missing property '"+_typePropertyName+"' that is to contain type id (for class "+baseTypeName()+")"); }
if (deser == null) { Object result = TypeDeserializer.deserializeIfNatural(p, ctxt, _baseType); if (result != null) { return result;
Object result = TypeDeserializer.deserializeIfNatural(p, ctxt, _baseType); if (result != null) { return result;
buffered.nextToken(); SettableBeanProperty extProp = _properties[i].getProperty(); Object result = TypeDeserializer.deserializeIfNatural(buffered, ctxt, extProp.getType()); if (result != null) { extProp.set(bean, result);
buffered.nextToken(); SettableBeanProperty extProp = _properties[i].getProperty(); Object result = TypeDeserializer.deserializeIfNatural(buffered, ctxt, extProp.getType()); if (result != null) { extProp.set(bean, result);
buffered.nextToken(); SettableBeanProperty extProp = _properties[i].getProperty(); Object result = TypeDeserializer.deserializeIfNatural(buffered, ctxt, extProp.getType()); if (result != null) { extProp.set(bean, result);
buffered.nextToken(); SettableBeanProperty extProp = _properties[i].getProperty(); Object result = TypeDeserializer.deserializeIfNatural(buffered, ctxt, extProp.getType()); if (result != null) { extProp.set(bean, result);