Deprecated
as a consequence of SchemaAware being deprecated. See corresponding docs for further information.
| 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. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | StdSerializer(Class<?> t, boolean dummy)
Alternate constructor that is (alas!) needed to work around kinks of generic type handling |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected static final boolean | |
| protected static final boolean | |
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType
Type of element (entity like property) being visited typeHint)Overrides com. Implements com. |
| protected ObjectNode | |
| protected ObjectNode | |
| protected JsonSerializer | findAnnotatedContentSerializer(SerializerProvider serializers, BeanProperty property)
Convenience method for finding out possibly configured content value serializer. |
| protected JsonSerializer | findContextualConvertingSerializer(SerializerProvider provider, BeanProperty property, JsonSerializer<?>
(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 JsonSerializer | findConvertingContentSerializer(SerializerProvider provider, BeanProperty prop, JsonSerializer<?> existingSerializer)
Deprecated
Since 2.9 use {link
findContextualConvertingSerializer instead
|
| protected Boolean | findFormatFeature(SerializerProvider provider, BeanProperty prop, Class<?>
Type (erased) used for finding default format settings, if any typeForDefaults, JsonFormat.Convenience method that uses |
| protected JsonFormat. | findFormatOverrides(SerializerProvider 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(SerializerProvider provider, Object filterId, Object valueToFilter)
Helper method used to locate filter that is needed, based on filter id this serializer was constructed with. |
| public JsonNode | getSchema(SerializerProvider
The serializer provider. provider, Type A hint about the type. typeHint)Implements com.
Deprecated
Since 2.15, we recommend use of external
JSON Schema generator module
Default implementation simply claims type is "string"; usually
overriden by custom serializers.
|
| public JsonNode | getSchema(SerializerProvider
The serializer provider. provider, Type A hint about the type. typeHint, boolean Is the type optional isOptional)Implements com.
Deprecated
Since 2.15, we recommend use of external
JSON Schema generator module
Default implementation simply claims type is "string"; usually
overriden by custom serializers.
|
| public Class | handledType()
Overrides com. |
| protected boolean | isDefaultSerializer(JsonSerializer<?> 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 to serialize; can not be null. value, JsonGenerator Generator used to output resulting Json content gen, SerializerProvider Provider that can be used to get serializers for
serializing Objects value contains, if any. provider)Implements abstract com. |
| protected void | visitArrayFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonSerializer<?> 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(SerializerProvider provider, 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<T> _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.
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| StdSerializer | back to summary |
|---|---|
| protected StdSerializer(Class<T> t) | |
| StdSerializer | back to summary |
|---|---|
protected StdSerializer(JavaType type)
| |
| StdSerializer | back to summary |
|---|---|
| protected StdSerializer(Class<?> t, boolean dummy) Alternate constructor that is (alas!) needed to work around kinks of generic type handling
| |
| StdSerializer | back to summary |
|---|---|
| protected StdSerializer(StdSerializer<?> src)
Deprecated as a consequence of
| |
| _neitherNull | back to summary |
|---|---|
protected static final boolean _neitherNull(Object a, Object b)
| |
| _nonEmpty | back to summary |
|---|---|
protected static final boolean _nonEmpty(Collection<?> c)
| |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException Overrides com. Implements com. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| 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 JsonSerializer Convenience method for finding out possibly configured content value serializer.
| |
| findContextualConvertingSerializer | back to summary |
|---|---|
| protected JsonSerializer 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)
| |
| findConvertingContentSerializer | back to summary |
|---|---|
| protected JsonSerializer Deprecated Since 2.9 use {link
| |
| findFormatFeature | back to summary |
|---|---|
| protected Boolean findFormatFeature(SerializerProvider 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(SerializerProvider provider, Object filterId, Object valueToFilter) throws JsonMappingException Helper method used to locate filter that is needed, based on filter id this serializer was constructed with.
| |
| getSchema | back to summary |
|---|---|
| public JsonNode getSchema(SerializerProvider provider, Type typeHint) throws JsonMappingException Implements com. Deprecated Since 2.15, we recommend use of external JSON Schema generator module Default implementation simply claims type is "string"; usually overriden by custom serializers.
| |
| getSchema | back to summary |
|---|---|
| public JsonNode getSchema(SerializerProvider provider, Type typeHint, boolean isOptional) throws JsonMappingException Implements com. Deprecated Since 2.15, we recommend use of external JSON Schema generator module Default implementation simply claims type is "string"; usually overriden by custom serializers.
| |
| handledType | back to summary |
|---|---|
| public Class Overrides com. Doc from com. 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).
Default implementation will return null, which essentially means
same as returning
| |
| isDefaultSerializer | back to summary |
|---|---|
| protected boolean isDefaultSerializer(JsonSerializer<?> 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, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. 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, JsonSerializer<?> itemSerializer, JavaType itemType) throws JsonMappingException
| |
| visitArrayFormat | back to summary |
|---|---|
protected void visitArrayFormat(JsonFormatVisitorWrapper visitor, JavaType typeHint, JsonFormatTypes itemType) throws JsonMappingException
| |
| 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) throws JsonMappingException 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) throws JsonMappingException 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(SerializerProvider provider, Throwable t, Object bean, String fieldName) throws IOException 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(SerializerProvider provider, Throwable t, Object bean, int index) throws IOException | |