public class ToStringSerializer extends ToStringSerializerBase
Object.toString()
returns the desired JSON
value.
Since 2.10 extends ToStringSerializerBase
JsonSerializer.None
Modifier and Type | Field and Description |
---|---|
static ToStringSerializer |
instance
Singleton instance to use.
|
_handledType
Constructor and Description |
---|
ToStringSerializer()
Note: usually you should NOT create new instances, but instead use
instance which is stateless and fully thread-safe. |
ToStringSerializer(Class<?> handledType)
Sometimes it may actually make sense to retain actual handled type.
|
Modifier and Type | Method and Description |
---|---|
String |
valueToString(Object value) |
acceptJsonFormatVisitor, getSchema, isEmpty, serialize, serializeWithType
_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId
public static final ToStringSerializer instance
public ToStringSerializer()
Note: usually you should NOT create new instances, but instead use
instance
which is stateless and fully thread-safe. However,
there are cases where constructor is needed; for example,
when using explicit serializer annotations like
JsonSerialize.using()
.
public ToStringSerializer(Class<?> handledType)
public final String valueToString(Object value)
valueToString
in class ToStringSerializerBase
Copyright © 2008–2023 FasterXML. All rights reserved.