@Deprecated // since 2.8; remove unless getting used protected Object _missingToken(JsonParser p, DeserializationContext ctxt) throws IOException { throw ctxt.endOfInputException(handledType()); }
/** * Helper method called for rare case of pointing to {@link JsonToken#VALUE_NULL} * token. While this is most often an erroneous condition, there is one specific * case with XML handling where polymorphic type with no properties is exposed * as such, and should be handled same as empty Object. * * @since 2.7 */ protected Object deserializeFromNull(JsonParser p, DeserializationContext ctxt) throws IOException { // 17-Dec-2015, tatu: Highly specialized case, mainly to support polymorphic // "empty" POJOs deserialized from XML, where empty XML tag synthesizes a // `VALUE_NULL` token. if (p.requiresCustomCodec()) { // not only XML module, but mostly it... @SuppressWarnings("resource") TokenBuffer tb = new TokenBuffer(p, ctxt); tb.writeEndObject(); JsonParser p2 = tb.asParser(p); p2.nextToken(); // to point to END_OBJECT // note: don't have ObjectId to consider at this point, so: Object ob = _vanillaProcessing ? vanillaDeserialize(p2, ctxt, JsonToken.END_OBJECT) : deserializeFromObject(p2, ctxt); p2.close(); return ob; } return ctxt.handleUnexpectedToken(handledType(), p); }
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
ctxt.reportWrongTokenException(this, JsonToken.END_OBJECT, "Attempted to unwrap '%s' value", handledType().getName()); handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
return ctxt.handleInstantiationProblem(handledType(), null, _creatorReturnedNullException()); handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
return ctxt.handleUnexpectedToken(handledType(), p);
protected Object _missingToken(JsonParser p, DeserializationContext ctxt) throws JsonProcessingException { throw ctxt.endOfInputException(handledType()); }
protected Object _missingToken(JsonParser p, DeserializationContext ctxt) throws JsonProcessingException { throw ctxt.endOfInputException(handledType()); }
@Deprecated // since 2.8; remove unless getting used protected Object _missingToken(JsonParser p, DeserializationContext ctxt) throws IOException { throw ctxt.endOfInputException(handledType()); }
@Deprecated // since 2.8; remove unless getting used protected Object _missingToken(JsonParser p, DeserializationContext ctxt) throws IOException { throw ctxt.endOfInputException(handledType()); }
/** * Helper method called for rare case of pointing to {@link JsonToken#VALUE_NULL} * token. While this is most often an erroneous condition, there is one specific * case with XML handling where polymorphic type with no properties is exposed * as such, and should be handled same as empty Object. * * @since 2.7 */ protected Object deserializeFromNull(JsonParser p, DeserializationContext ctxt) throws IOException { // 17-Dec-2015, tatu: Highly specialized case, mainly to support polymorphic // "empty" POJOs deserialized from XML, where empty XML tag synthesizes a // `VALUE_NULL` token. if (p.requiresCustomCodec()) { // not only XML module, but mostly it... @SuppressWarnings("resource") TokenBuffer tb = new TokenBuffer(p, ctxt); tb.writeEndObject(); JsonParser p2 = tb.asParser(p); p2.nextToken(); // to point to END_OBJECT // note: don't have ObjectId to consider at this point, so: Object ob = _vanillaProcessing ? vanillaDeserialize(p2, ctxt, JsonToken.END_OBJECT) : deserializeFromObject(p2, ctxt); p2.close(); return ob; } return ctxt.handleUnexpectedToken(handledType(), p); }
/** * Helper method called for rare case of pointing to {@link JsonToken#VALUE_NULL} * token. While this is most often an erroneous condition, there is one specific * case with XML handling where polymorphic type with no properties is exposed * as such, and should be handled same as empty Object. * * @since 2.7 */ protected Object deserializeFromNull(JsonParser p, DeserializationContext ctxt) throws IOException { // 17-Dec-2015, tatu: Highly specialized case, mainly to support polymorphic // "empty" POJOs deserialized from XML, where empty XML tag synthesizes a // `VALUE_NULL` token. if (p.requiresCustomCodec()) { // not only XML module, but mostly it... @SuppressWarnings("resource") TokenBuffer tb = new TokenBuffer(p, ctxt); tb.writeEndObject(); JsonParser p2 = tb.asParser(p); p2.nextToken(); // to point to END_OBJECT // note: don't have ObjectId to consider at this point, so: Object ob = _vanillaProcessing ? vanillaDeserialize(p2, ctxt, JsonToken.END_OBJECT) : deserializeFromObject(p2, ctxt); p2.close(); return ob; } return ctxt.handleUnexpectedToken(handledType(), p); }
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
handleIgnoredProperty(p, ctxt, handledType(), propName); continue;
throw ctxt.mappingException(handledType());
throw ctxt.mappingException(handledType());
return ctxt.handleUnexpectedToken(handledType(), p);
default: return ctxt.handleUnexpectedToken(handledType(), p);