Class NumberToStringWithRadixSerializer

All Implemented Interfaces:
JsonFormatVisitable

public class NumberToStringWithRadixSerializer extends ToStringSerializerBase
Serializer used to convert numbers into a representation for a specified radix (base) and serialize the representation as string.
Since:
3.1
  • Constructor Details

    • NumberToStringWithRadixSerializer

      public NumberToStringWithRadixSerializer(int radix)
    • NumberToStringWithRadixSerializer

      public NumberToStringWithRadixSerializer(Class<?> handledType, int radix)
  • Method Details

    • isEmpty

      public boolean isEmpty(SerializationContext ctxt, Object value)
      Description copied from class: ValueSerializer
      Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).

      Default implementation will consider only null values to be empty.

      Overrides:
      isEmpty in class ToStringSerializerBase
    • serialize

      public void serialize(Object value, tools.jackson.core.JsonGenerator gen, SerializationContext provider) throws tools.jackson.core.JacksonException
      Description copied from class: ValueSerializer
      Method that can be called to ask implementation to serialize values of type this serializer handles.
      Overrides:
      serialize in class ToStringSerializerBase
      Parameters:
      value - Value to serialize; can not be null.
      gen - Generator used to output resulting Json content
      provider - Context that can be used to get serializers for serializing Objects value contains, if any.
      Throws:
      tools.jackson.core.JacksonException
    • valueToString

      public String valueToString(Object value)
      Specified by:
      valueToString in class ToStringSerializerBase