Class NumberSerializer.BigDecimalAsStringSerializer

All Implemented Interfaces:
JsonFormatVisitable
Enclosing class:
NumberSerializer

static final class NumberSerializer.BigDecimalAsStringSerializer extends ToStringSerializerBase
  • Field Details

  • Constructor Details

    • BigDecimalAsStringSerializer

      public BigDecimalAsStringSerializer()
  • Method Details

    • isEmpty

      public boolean isEmpty(SerializationContext prov, 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 ctxt) 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
      ctxt - 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
    • _verifyBigDecimalRange

      protected boolean _verifyBigDecimalRange(tools.jackson.core.JsonGenerator gen, BigDecimal value)