T - the supported object typepublic abstract class JsonObjectDeserializer<T>
extends com.fasterxml.jackson.databind.JsonDeserializer<T>
JsonDeserializer implementations that deserialize
objects.JsonObjectSerializer| Constructor and Description |
|---|
JsonObjectDeserializer() |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(com.fasterxml.jackson.core.JsonParser jp,
com.fasterxml.jackson.databind.DeserializationContext ctxt) |
protected abstract T |
deserializeObject(com.fasterxml.jackson.core.JsonParser jsonParser,
com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.ObjectCodec codec,
com.fasterxml.jackson.databind.JsonNode tree)
Deserialize JSON content into the value type this serializer handles.
|
protected com.fasterxml.jackson.databind.JsonNode |
getRequiredNode(com.fasterxml.jackson.databind.JsonNode tree,
String fieldName)
Helper method to return a
JsonNode from the tree. |
protected <D> D |
nullSafeValue(com.fasterxml.jackson.databind.JsonNode jsonNode,
Class<D> type)
Helper method to extract a value from the given
jsonNode or return
null when the node itself is null. |
deserialize, deserializeWithType, findBackReference, getDelegatee, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, replaceDelegatee, unwrappingDeserializerpublic final T deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException
deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<T>IOExceptionprotected abstract T deserializeObject(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.core.ObjectCodec codec, com.fasterxml.jackson.databind.JsonNode tree) throws IOException
jsonParser - the source parser used for reading JSON contentcontext - context that can be used to access information about this
deserialization activitycodec - the ObjectCodec associated with the parsertree - deserialized JSON content as tree expressed using set of
TreeNode instancesIOException - on errordeserialize(JsonParser, DeserializationContext)protected final <D> D nullSafeValue(com.fasterxml.jackson.databind.JsonNode jsonNode,
Class<D> type)
jsonNode or return
null when the node itself is null.D - the data type requestedjsonNode - the source node (may be null)type - the data type. May be String, Boolean, Long,
Integer, Short, Double, Float, BigDecimal
or BigInteger.nullprotected final com.fasterxml.jackson.databind.JsonNode getRequiredNode(com.fasterxml.jackson.databind.JsonNode tree,
String fieldName)
JsonNode from the tree.tree - the source treefieldName - the field name to extractJsonNodeCopyright © 2017 Pivotal Software, Inc.. All rights reserved.