| Modifier and Type | Field and Description |
|---|---|
| protected final Class | _handledType
Nominal type supported, usually declared type of property for which serializer is used. |
| private static final Object | KEY_CONTENT_CONVERTER_LOCK
Key used for storing a lock object to prevent infinite recursion when constructing converting serializers. |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | StdSerializer(Class<?> t, boolean dummy)
Deprecated
Alternate constructor that is (alas!) needed to work around kinks of generic type handling |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private ValueSerializer | _findConvertingContentSerializer(SerializationContext provider, AnnotationIntrospector intr, BeanProperty prop, ValueSerializer<?> existingSerializer)
|
| protected static final boolean | |
| protected static final boolean | |
| protected JacksonException | |
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
Overrides tools. Implements tools. Default implementation specifies no format. |
| protected void | acceptJsonFormatVisitorForBinary(JsonFormatVisitorWrapper visitor, JavaType typeHint)
Helper method for handling Binary values: typically serialized as Base64-encoded data (in textual formats) or native binary (binary formats). |
| protected ObjectNode | |
| protected ObjectNode | |
| protected ValueSerializer | findAnnotatedContentSerializer(SerializationContext serializers, BeanProperty property)
Convenience method for finding out possibly configured content value serializer. |
| protected ValueSerializer | findContextualConvertingSerializer(SerializationContext provider, BeanProperty prop, ValueSerializer<?>
(optional) configured content
serializer if one already exists. existingSerializer)Helper method that can be used to see if specified property has annotation indicating that a converter is to be used for contained values (contents of structured types; array/List/Map values) |
| protected Boolean | findFormatFeature(SerializationContext provider, BeanProperty prop, Class<?>
Type (erased) used for finding default format settings, if any typeForDefaults, JsonFormat.Convenience method that uses |
| protected JsonFormat. | findFormatOverrides(SerializationContext provider, BeanProperty prop, Class<?>
Type (erased) used for finding default format settings, if any typeForDefaults)Helper method that may be used to find if this deserializer has specific
|
| protected JsonInclude. | |
| protected PropertyFilter | findPropertyFilter(SerializationContext provider, Object filterId, Object valueToFilter)
Helper method used to locate filter that is needed, based on filter id this serializer was constructed with. |
| public Class | handledType()
Overrides tools. Method for accessing type of Objects this serializer can handle. |
| protected boolean | isDefaultSerializer(ValueSerializer<?> serializer)
Method that can be called to determine if given serializer is the default serializer Jackson uses; as opposed to a custom serializer installed by a module or calling application. |
| public abstract void | serialize(T value, JsonGenerator gen, SerializationContext provider)
Implements abstract tools. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| protected void | visitArrayFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, ValueSerializer<?> itemSerializer, JavaType itemType)
|
| protected void | |
| protected void | visitFloatFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonParser.
Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is a floating-point JSON number. |
| protected void | visitIntFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonParser.
Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is JSON Integer number. |
| protected void | visitIntFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonParser.
Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is JSON Integer number, but that there is also a further format restriction involved. |
| protected void | visitStringFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint)
Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is JSON String. |
| protected void | visitStringFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonValueFormat format)
Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is JSON String, but that there is a more refined logical type |
| public void | wrapAndThrow(SerializationContext ctxt, Throwable t, Object bean, String fieldName)
Method that will modify caught exception (passed in as argument)
as necessary to include reference information, and to ensure it
is a subtype of |
| public void |
| _handledType | back to summary |
|---|---|
| protected final Class<?> _handledType Nominal type supported, usually declared type of property for which serializer is used. | |
| KEY_CONTENT_CONVERTER_LOCK | back to summary |
|---|---|
| private static final Object KEY_CONTENT_CONVERTER_LOCK Key used for storing a lock object to prevent infinite recursion when constructing converting serializers. | |
| StdSerializer | back to summary |
|---|---|
| protected StdSerializer(Class<?> t) | |
| StdSerializer | back to summary |
|---|---|
| protected StdSerializer(JavaType type) | |
| StdSerializer | back to summary |
|---|---|
| protected StdSerializer(Class<?> t, boolean dummy)
Deprecated
Alternate constructor that is (alas!) needed to work around kinks of generic type handling
| |
| StdSerializer | back to summary |
|---|---|
| protected StdSerializer(StdSerializer<?> src) | |
| _findConvertingContentSerializer | back to summary |
|---|---|
| private ValueSerializer | |
| _neitherNull | back to summary |
|---|---|
| protected static final boolean _neitherNull(Object a, Object b) | |
| _nonEmpty | back to summary |
|---|---|
| protected static final boolean _nonEmpty(Collection<?> c) | |
| _wrapIOFailure | back to summary |
|---|---|
| protected JacksonException _wrapIOFailure(SerializationContext ctxt, IOException e) | |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) Overrides tools. Implements tools. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| acceptJsonFormatVisitorForBinary | back to summary |
|---|---|
| protected void acceptJsonFormatVisitorForBinary(JsonFormatVisitorWrapper visitor, JavaType typeHint) Helper method for handling Binary values: typically serialized as Base64-encoded data (in textual formats) or native binary (binary formats). | |
| createSchemaNode | back to summary |
|---|---|
| protected ObjectNode createSchemaNode(String type) | |
| createSchemaNode | back to summary |
|---|---|
| protected ObjectNode createSchemaNode(String type, boolean isOptional) | |
| findAnnotatedContentSerializer | back to summary |
|---|---|
| protected ValueSerializer Convenience method for finding out possibly configured content value serializer. | |
| findContextualConvertingSerializer | back to summary |
|---|---|
| protected ValueSerializer Helper method that can be used to see if specified property has annotation indicating that a converter is to be used for contained values (contents of structured types; array/List/Map values)
| |
| findFormatFeature | back to summary |
|---|---|
| protected Boolean findFormatFeature(SerializationContext provider, BeanProperty prop, Class<?> typeForDefaults, JsonFormat. Convenience method that uses
| |
| findFormatOverrides | back to summary |
|---|---|
| protected JsonFormat. Helper method that may be used to find if this deserializer has specific
| |
| findIncludeOverrides | back to summary |
|---|---|
| protected JsonInclude. | |
| findPropertyFilter | back to summary |
|---|---|
| protected PropertyFilter findPropertyFilter(SerializationContext provider, Object filterId, Object valueToFilter) Helper method used to locate filter that is needed, based on filter id this serializer was constructed with. | |
| handledType | back to summary |
|---|---|
| public Class Overrides tools. Doc from tools. Method for accessing type of Objects this serializer can handle. Note that this information is not guaranteed to be exact -- it may be a more generic (super-type) -- but it should not be incorrect (return a non-related type). Note starting with 3.0, left
| |
| isDefaultSerializer | back to summary |
|---|---|
| protected boolean isDefaultSerializer(ValueSerializer<?> serializer) Method that can be called to determine if given serializer is the default
serializer Jackson uses; as opposed to a custom serializer installed by
a module or calling application. Determination is done using
| |
| serialize | back to summary |
|---|---|
| public abstract void serialize(T value, JsonGenerator gen, SerializationContext provider) throws JacksonException Implements abstract tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| visitArrayFormat | back to summary |
|---|---|
| protected void visitArrayFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, ValueSerializer<?> itemSerializer, JavaType itemType) | |
| visitArrayFormat | back to summary |
|---|---|
| protected void visitArrayFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonFormatTypes itemType) | |
| visitFloatFormat | back to summary |
|---|---|
| protected void visitFloatFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonParser. Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is a floating-point JSON number. | |
| visitIntFormat | back to summary |
|---|---|
| protected void visitIntFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonParser. Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is JSON Integer number. | |
| visitIntFormat | back to summary |
|---|---|
| protected void visitIntFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonParser. Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is JSON Integer number, but that there is also a further format restriction involved. | |
| visitStringFormat | back to summary |
|---|---|
| protected void visitStringFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint) Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is JSON String. | |
| visitStringFormat | back to summary |
|---|---|
| protected void visitStringFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonValueFormat format) Helper method that calls necessary visit method(s) to indicate that the underlying JSON type is JSON String, but that there is a more refined logical type | |
| wrapAndThrow | back to summary |
|---|---|
| public void wrapAndThrow(SerializationContext ctxt, Throwable t, Object bean, String fieldName) throws JacksonException Method that will modify caught exception (passed in as argument)
as necessary to include reference information, and to ensure it
is a subtype of Rules for wrapping and unwrapping are bit complicated; essentially:
| |
| wrapAndThrow | back to summary |
|---|---|
| public void wrapAndThrow(SerializationContext ctxt, Throwable t, Object bean, int index) throws JacksonException | |