return _deserializeFromObjectId(p, ctxt); return _deserializeFromObjectId(p, ctxt);
@Override public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, JsonProcessingException { // Hmmh. One tricky question; for scalar, is it an Object Id, or "Natural" type? // for now, prefer Object Id: if (_objectIdReader != null) { JsonToken t = jp.getCurrentToken(); // should be good enough check; we only care about Strings, integral numbers: if (t != null && t.isScalarValue()) { return _deserializeFromObjectId(jp, ctxt); } } // First: support "natural" values (which are always serialized without type info!) Object result = _deserializeIfNatural(jp, ctxt); if (result != null) { return result; } return typeDeserializer.deserializeTypedFromObject(jp, ctxt); }
@Override public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, JsonProcessingException { // Hmmh. One tricky question; for scalar, is it an Object Id, or "Natural" type? // for now, prefer Object Id: if (_objectIdReader != null) { JsonToken t = jp.getCurrentToken(); // should be good enough check; we only care about Strings, integral numbers: if (t != null && t.isScalarValue()) { return _deserializeFromObjectId(jp, ctxt); } } // First: support "natural" values (which are always serialized without type info!) Object result = _deserializeIfNatural(jp, ctxt); if (result != null) { return result; } return typeDeserializer.deserializeTypedFromObject(jp, ctxt); }
return _deserializeFromObjectId(p, ctxt); return _deserializeFromObjectId(p, ctxt);
@Override public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, JsonProcessingException { // Hmmh. One tricky question; for scalar, is it an Object Id, or "Natural" type? // for now, prefer Object Id: if (_objectIdReader != null) { JsonToken t = jp.getCurrentToken(); // should be good enough check; we only care about Strings, integral numbers: if (t != null && t.isScalarValue()) { return _deserializeFromObjectId(jp, ctxt); } } // First: support "natural" values (which are always serialized without type info!) Object result = _deserializeIfNatural(jp, ctxt); if (result != null) { return result; } return typeDeserializer.deserializeTypedFromObject(jp, ctxt); }
return _deserializeFromObjectId(p, ctxt); return _deserializeFromObjectId(p, ctxt);
@Override public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, JsonProcessingException { // Hmmh. One tricky question; for scalar, is it an Object Id, or "Natural" type? // for now, prefer Object Id: if (_objectIdReader != null) { JsonToken t = jp.getCurrentToken(); // should be good enough check; we only care about Strings, integral numbers: if (t != null && t.isScalarValue()) { return _deserializeFromObjectId(jp, ctxt); } } // First: support "natural" values (which are always serialized without type info!) Object result = _deserializeIfNatural(jp, ctxt); if (result != null) { return result; } return typeDeserializer.deserializeTypedFromObject(jp, ctxt); }