Class NumberSerializer.BigDecimalAsStringSerializer

    • Constructor Detail

      • BigDecimalAsStringSerializer

        public BigDecimalAsStringSerializer()
    • Method Detail

      • isEmpty

        public boolean isEmpty​(SerializerProvider prov,
                               java.lang.Object value)
        Description copied from class: JsonSerializer
        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.

        NOTE: replaces JsonSerializer.isEmpty(Object), which was deprecated in 2.5

        Overrides:
        isEmpty in class ToStringSerializerBase
      • serialize

        public void serialize​(java.lang.Object value,
                              com.fasterxml.jackson.core.JsonGenerator gen,
                              SerializerProvider provider)
                       throws java.io.IOException
        Description copied from class: JsonSerializer
        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 - Provider that can be used to get serializers for serializing Objects value contains, if any.
        Throws:
        java.io.IOException
      • _verifyBigDecimalRange

        protected boolean _verifyBigDecimalRange​(com.fasterxml.jackson.core.JsonGenerator gen,
                                                 java.math.BigDecimal value)
                                          throws java.io.IOException
        Throws:
        java.io.IOException