public class JsonNodeDeserializer extends StdDeserializer<N>
JsonNode
from any
JSON content, using appropriate JsonNode
type.StdDeserializer.BigDecimalDeserializer, StdDeserializer.BigIntegerDeserializer, StdDeserializer.BooleanDeserializer, StdDeserializer.ByteDeserializer, StdDeserializer.CharacterDeserializer, StdDeserializer.DoubleDeserializer, StdDeserializer.FloatDeserializer, StdDeserializer.IntegerDeserializer, StdDeserializer.LongDeserializer, StdDeserializer.NumberDeserializer, StdDeserializer.PrimitiveOrWrapperDeserializer<T>, StdDeserializer.ShortDeserializer, StdDeserializer.SqlDateDeserializer, StdDeserializer.StackTraceElementDeserializer
JsonDeserializer.None
_valueClass
Modifier | Constructor and Description |
---|---|
protected |
JsonNodeDeserializer() |
Modifier and Type | Method and Description |
---|---|
protected void |
_handleDuplicateField(String fieldName,
ObjectNode objectNode,
JsonNode oldValue,
JsonNode newValue)
Method called when there is a duplicate value for a field.
|
protected void |
_reportProblem(JsonParser jp,
String msg) |
JsonNode |
deserialize(JsonParser jp,
DeserializationContext ctxt)
Implementation that will produce types of any JSON nodes; not just one
deserializer is registered to handle (in case of more specialized handler).
|
protected JsonNode |
deserializeAny(JsonParser jp,
DeserializationContext ctxt,
JsonNodeFactory nodeFactory) |
protected ArrayNode |
deserializeArray(JsonParser jp,
DeserializationContext ctxt,
JsonNodeFactory nodeFactory) |
protected ObjectNode |
deserializeObject(JsonParser jp,
DeserializationContext ctxt,
JsonNodeFactory nodeFactory) |
Object |
deserializeWithType(JsonParser jp,
DeserializationContext ctxt,
TypeDeserializer typeDeserializer)
Base implementation that does not assume specific type
inclusion mechanism.
|
static JsonDeserializer<? extends JsonNode> |
getDeserializer(Class<?> nodeClass)
Factory method for accessing deserializer for specific node type
|
_parseBoolean, _parseBooleanFromNumber, _parseBooleanPrimitive, _parseByte, _parseDate, _parseDouble, _parseDoublePrimitive, _parseFloat, _parseFloatPrimitive, _parseInteger, _parseIntPrimitive, _parseLong, _parseLongPrimitive, _parseShort, _parseShortPrimitive, findDeserializer, getValueClass, getValueType, handleUnknownProperty, isDefaultSerializer, parseDouble, reportUnknownProperty
deserialize, getEmptyValue, getNullValue, unwrappingDeserializer
public static JsonDeserializer<? extends JsonNode> getDeserializer(Class<?> nodeClass)
public JsonNode deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
deserialize
in class JsonDeserializer<JsonNode>
jp
- Parsed used for reading JSON contentctxt
- Context that can be used to access information about
this deserialization activity.IOException
JsonProcessingException
public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, JsonProcessingException
StdDeserializer
deserializeWithType
in class StdDeserializer<N extends JsonNode>
typeDeserializer
- Deserializer to use for handling type informationIOException
JsonProcessingException
protected void _reportProblem(JsonParser jp, String msg) throws JsonMappingException
JsonMappingException
protected void _handleDuplicateField(String fieldName, ObjectNode objectNode, JsonNode oldValue, JsonNode newValue) throws JsonProcessingException
fieldName
- Name of the field for which duplicate value was foundobjectNode
- Object node that contains valuesoldValue
- Value that existed for the object node before newValue
was addednewValue
- Newly added value just added to the object nodeJsonProcessingException
protected final ObjectNode deserializeObject(JsonParser jp, DeserializationContext ctxt, JsonNodeFactory nodeFactory) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected final ArrayNode deserializeArray(JsonParser jp, DeserializationContext ctxt, JsonNodeFactory nodeFactory) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected final JsonNode deserializeAny(JsonParser jp, DeserializationContext ctxt, JsonNodeFactory nodeFactory) throws IOException, JsonProcessingException
IOException
JsonProcessingException