/** * Secondary deserialization method, called in cases where POJO * instance is created as part of deserialization, potentially * after collecting some or all of the properties to set. */ @Override public Object deserialize(JsonParser p, DeserializationContext ctxt, Object value) throws IOException { // 26-Oct-2016, tatu: I cannot see any of making this actually // work correctly, so let's indicate problem right away JavaType valueType = _targetType; // Did they try to give us builder? Class<?> builderRawType = handledType(); Class<?> instRawType = value.getClass(); if (builderRawType.isAssignableFrom(instRawType)) { return ctxt.reportBadDefinition(valueType, String.format( "Deserialization of %s by passing existing Builder (%s) instance not supported", valueType, builderRawType.getName())); } return ctxt.reportBadDefinition(valueType, String.format( "Deserialization of %s by passing existing instance (of %s) not supported", valueType, instRawType.getName())); }
handleUnknownVanilla(p, ctxt, handledType(), propName);
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
default: return ctxt.handleUnexpectedToken(handledType(), p);
/** * Secondary deserialization method, called in cases where POJO * instance is created as part of deserialization, potentially * after collecting some or all of the properties to set. */ @Override public Object deserialize(JsonParser p, DeserializationContext ctxt, Object value) throws IOException { // 26-Oct-2016, tatu: I cannot see any of making this actually // work correctly, so let's indicate problem right away JavaType valueType = _targetType; // Did they try to give us builder? Class<?> builderRawType = handledType(); Class<?> instRawType = value.getClass(); if (builderRawType.isAssignableFrom(instRawType)) { return ctxt.reportBadDefinition(valueType, String.format( "Deserialization of %s by passing existing Builder (%s) instance not supported", valueType, builderRawType.getName())); } return ctxt.reportBadDefinition(valueType, String.format( "Deserialization of %s by passing existing instance (of %s) not supported", valueType, instRawType.getName())); }
handleUnknownVanilla(jp, ctxt, handledType(), propName);
handleUnknownVanilla(jp, ctxt, handledType(), propName);
handleUnknownVanilla(p, ctxt, handledType(), propName);
handleUnknownVanilla(p, ctxt, handledType(), propName);
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
handleIgnoredProperty(jp, ctxt, handledType(), propName); continue;
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
handleIgnoredProperty(jp, ctxt, handledType(), propName); continue;
handleIgnoredProperty(jp, ctxt, handledType(), propName); continue;
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
return finishBuild(ctxt, deserializeFromObject(jp, ctxt)); default: throw ctxt.mappingException(handledType());
return ctxt.handleUnexpectedToken(handledType(), p);
return finishBuild(ctxt, deserializeFromObject(jp, ctxt)); default: throw ctxt.mappingException(handledType());
default: return ctxt.handleUnexpectedToken(handledType(), p);