protected JsonDeserializer<Object> _findCustomDeser(DeserializationContext ctxt, JavaType type) throws JsonMappingException { // Since we are calling from `resolve`, we should NOT try to contextualize yet; // contextualization will only occur at a later point return ctxt.findNonContextualValueDeserializer(type); }
/** * Helper method that can be used to see if specified property is annotated * to indicate use of a converter for property value (in case of container types, * it is container type itself, not key or content type). *<p> * NOTE: returned deserializer is NOT yet contextualized, caller needs to take * care to do that. * * @since 2.2 */ protected JsonDeserializer<Object> findConvertingDeserializer(DeserializationContext ctxt, SettableBeanProperty prop) throws JsonMappingException { final AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { Object convDef = intr.findDeserializationConverter(prop.getMember()); if (convDef != null) { Converter<Object,Object> conv = ctxt.converterInstance(prop.getMember(), convDef); JavaType delegateType = conv.getInputType(ctxt.getTypeFactory()); // 25-Mar-2017, tatu: should not yet contextualize // JsonDeserializer<?> deser = ctxt.findContextualValueDeserializer(delegateType, prop); JsonDeserializer<?> deser = ctxt.findNonContextualValueDeserializer(delegateType); return new StdDelegatingDeserializer<Object>(conv, delegateType, deser); } } return null; }
deser = ctxt.findNonContextualValueDeserializer(prop.getType());
protected JsonDeserializer<Object> _findCustomDeser(DeserializationContext ctxt, JavaType type) throws JsonMappingException { // Since we are calling from `resolve`, we should NOT try to contextualize yet; // contextualization will only occur at a later point return ctxt.findNonContextualValueDeserializer(type); }
protected JsonDeserializer<Object> _findCustomDeser(DeserializationContext ctxt, JavaType type) throws JsonMappingException { // Since we are calling from `resolve`, we should NOT try to contextualize yet; // contextualization will only occur at a later point return ctxt.findNonContextualValueDeserializer(type); }
@SuppressWarnings("unchecked") protected JsonDeserializer<Object> _findCustomDeser(DeserializationContext ctxt, JavaType type) throws JsonMappingException { // Since we are calling from `resolve`, we should NOT try to contextualize yet; // contextualization will only occur at a later point JsonDeserializer<?> deser = ctxt.findNonContextualValueDeserializer(type); if (ClassUtil.isJacksonStdImpl(deser)) { return null; } return (JsonDeserializer<Object>) deser; }
@SuppressWarnings("unchecked") protected JsonDeserializer<Object> _findCustomDeser(DeserializationContext ctxt, JavaType type) throws JsonMappingException { // Since we are calling from `resolve`, we should NOT try to contextualize yet; // contextualization will only occur at a later point JsonDeserializer<?> deser = ctxt.findNonContextualValueDeserializer(type); if (ClassUtil.isJacksonStdImpl(deser)) { return null; } return (JsonDeserializer<Object>) deser; }
type = typeFactory.constructType(param.getType()); JsonDeserializer<Object> deser = ctx.findNonContextualValueDeserializer(type); try { return deser.deserialize(p, ctx);
/** * Helper method that can be used to see if specified property is annotated * to indicate use of a converter for property value (in case of container types, * it is container type itself, not key or content type). *<p> * NOTE: returned deserializer is NOT yet contextualized, caller needs to take * care to do that. * * @since 2.2 */ protected JsonDeserializer<Object> findConvertingDeserializer(DeserializationContext ctxt, SettableBeanProperty prop) throws JsonMappingException { final AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { Object convDef = intr.findDeserializationConverter(prop.getMember()); if (convDef != null) { Converter<Object,Object> conv = ctxt.converterInstance(prop.getMember(), convDef); JavaType delegateType = conv.getInputType(ctxt.getTypeFactory()); // 25-Mar-2017, tatu: should not yet contextualize // JsonDeserializer<?> deser = ctxt.findContextualValueDeserializer(delegateType, prop); JsonDeserializer<?> deser = ctxt.findNonContextualValueDeserializer(delegateType); return new StdDelegatingDeserializer<Object>(conv, delegateType, deser); } } return null; }
/** * Helper method that can be used to see if specified property is annotated * to indicate use of a converter for property value (in case of container types, * it is container type itself, not key or content type). *<p> * NOTE: returned deserializer is NOT yet contextualized, caller needs to take * care to do that. * * @since 2.2 */ protected JsonDeserializer<Object> findConvertingDeserializer(DeserializationContext ctxt, SettableBeanProperty prop) throws JsonMappingException { final AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { Object convDef = intr.findDeserializationConverter(prop.getMember()); if (convDef != null) { Converter<Object,Object> conv = ctxt.converterInstance(prop.getMember(), convDef); JavaType delegateType = conv.getInputType(ctxt.getTypeFactory()); // 25-Mar-2017, tatu: should not yet contextualize // JsonDeserializer<?> deser = ctxt.findContextualValueDeserializer(delegateType, prop); JsonDeserializer<?> deser = ctxt.findNonContextualValueDeserializer(delegateType); return new StdDelegatingDeserializer<Object>(conv, delegateType, deser); } } return null; }
deser = ctxt.findNonContextualValueDeserializer(prop.getType());
deser = ctxt.findNonContextualValueDeserializer(prop.getType());