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.
|
| Constructor and Description |
|---|
ToStringSerializer()
Note: usually you should NOT create new instances, but instead use
instance which is stateless and fully thread-safe. |
ToStringSerializer(java.lang.Class<?> handledType)
Sometimes it may actually make sense to retain actual handled type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
valueToString(java.lang.Object value) |
acceptJsonFormatVisitor, getSchema, isEmpty, serialize, serializeWithTypegetSchema, handledType, wrapAndThrow, wrapAndThrowgetDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterIdpublic 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(java.lang.Class<?> handledType)
public final java.lang.String valueToString(java.lang.Object value)
valueToString in class ToStringSerializerBaseCopyright © 2010 - 2023 Adobe. All Rights Reserved