All Implemented Interfaces:
JsonFormatVisitable, SchemaAware, Serializable

public class ToStringSerializer extends ToStringSerializerBase
Simple general purpose serializer, useful for any type for which Object.toString() returns the desired JSON value.

Since 2.10 extends ToStringSerializerBase

See Also:
  • Field Details

  • Constructor Details

    • ToStringSerializer

      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().

    • ToStringSerializer

      public ToStringSerializer(Class<?> handledType)
      Sometimes it may actually make sense to retain actual handled type.
      Since:
      2.5
  • Method Details