Class FormatNumberSerializer
-
- All Implemented Interfaces:
-
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable,com.fasterxml.jackson.databind.jsonschema.SchemaAware,com.fasterxml.jackson.databind.ser.ContextualSerializer,java.io.Serializable
public class FormatNumberSerializer extends NumberSerializerDirectly use JsonFormat and DecimalFormat to format numbers
- Since:
2021-07-06
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumFormatNumberSerializer.Digital
-
Field Summary
Fields Modifier and Type Field Description public final static NumberSerializerinstance
-
Constructor Summary
Constructors Constructor Description FormatNumberSerializer(Class<out Number> rawType, DecimalFormat format, FormatNumberSerializer.Digital digital)
-
Method Summary
Modifier and Type Method Description JsonSerializer<out Object>createContextual(SerializerProvider prov, BeanProperty property)voidserialize(Number value, JsonGenerator g, SerializerProvider provider)-
Methods inherited from class com.fasterxml.jackson.databind.ser.std.NumberSerializer
acceptJsonFormatVisitor, bigDecimalAsStringSerializer, getSchema -
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdScalarSerializer
serializeWithType -
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
handledType, wrapAndThrow -
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
FormatNumberSerializer
FormatNumberSerializer(Class<out Number> rawType, DecimalFormat format, FormatNumberSerializer.Digital digital)
-
-
Method Detail
-
createContextual
JsonSerializer<out Object> createContextual(SerializerProvider prov, BeanProperty property)
-
-
-
-