Class AbstractCustomJacksonDeserializer<T>
java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<T>
com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
com.graphql_java_generator.client.response.AbstractCustomJacksonDeserializer<T>
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
,java.io.Serializable
public abstract class AbstractCustomJacksonDeserializer<T>
extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
Jackson Deserializer for Custom Scalar.
- Author:
- etienne-sf
- See Also:
- Serialized Form
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCustomJacksonDeserializer(AbstractCustomJacksonDeserializer<?> itemDeserializer, boolean list, java.lang.Class<?> handledType, graphql.schema.GraphQLScalarType graphQLScalarType)
protected
AbstractCustomJacksonDeserializer(java.lang.Class<?> handledType, graphql.schema.GraphQLScalarType graphQLScalarType)
The constructor, for non list field. -
Method Summary
Modifier and Type Method Description T
deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt)
Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer
_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, deserializeWithType, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
Constructor Details
-
AbstractCustomJacksonDeserializer
protected AbstractCustomJacksonDeserializer(java.lang.Class<?> handledType, graphql.schema.GraphQLScalarType graphQLScalarType)The constructor, for non list field. This constructor builds a custom jackson deserialize, for field that can't be deserialize by jackson alone. Typically: GraphQL custom scalars.- Parameters:
handledType
- The java type that contains the value of the final items, in the list. For instance for a GraphQL type [[Boolean]], the handle type isBoolean
. It is sent to the jacksonStdDeserializer
. It is also used when the recursion of the nested list is at the deepest level, and the read token is the "real" value.graphQLScalarType
- TheGraphQLScalarType
instance that manages this Custom Scalar. It's used to deserialize the value read on the Jackson response from the server It is mandatory for custom scalars, and must null for other data types.
-
AbstractCustomJacksonDeserializer
protected AbstractCustomJacksonDeserializer(AbstractCustomJacksonDeserializer<?> itemDeserializer, boolean list, java.lang.Class<?> handledType, graphql.schema.GraphQLScalarType graphQLScalarType)- Parameters:
itemDeserializer
- The class that can deserialize the items in the list. This recursion allows to deserialize list of lists.
This field must be null to deserialize non list objects. And it's mandatory, to deserialize lists.handledType
- The java type that contains the value of the final items, in the list. For instance for a GraphQL type [[Boolean]], the handle type isBoolean
. It is sent to the jacksonStdDeserializer
. It is also used when the recursion of the nested list is at the deepest level, and the read token is the "real" value.graphQLScalarType
- TheGraphQLScalarType
instance that manages this Custom Scalar. It's used to deserialize the value read on the Jackson response from the server It is mandatory for custom scalars, and must null for other data types.
-
-
Method Details
-
deserialize
public T deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException- Specified by:
deserialize
in classcom.fasterxml.jackson.databind.JsonDeserializer<T>
- Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
-