public class BigDecimalSerializer extends JavaTypeSerializer<java.math.BigDecimal>
BigDecimal instances.BIGDECIMAL_SERIALIZER, BIGINTEGER_SERIALIZER, BOOLEAN_SERIALIZER, BYTEARRAY_SERIALIZER, DOUBLE_SERIALIZER, FLOAT_SERIALIZER, INTEGER_SERIALIZER, LONG_SERIALIZER, mapper, SHORT_SERIALIZER, STRING_SERIALIZER| Constructor and Description |
|---|
BigDecimalSerializer()
Create a new serializer for
BigDecimal type. |
| Modifier and Type | Method and Description |
|---|---|
java.math.BigDecimal |
fromJson(java.math.BigDecimal arg,
java.lang.String sval)
Parse the string JSON representation and assign it to the given argument.
|
java.math.BigDecimal |
initialize(java.lang.Class<? extends java.math.BigDecimal> definitionType)
Create an initial (default) instance for this serializer.
|
com.fasterxml.jackson.databind.JsonNode |
toJson(java.math.BigDecimal val)
Serialize the given instance to JSON.
|
bootstrap, fromJson, getSerializer, getSerializer, getType, newInstance, newRecord, readArray, readArray, readArray, readMap, resolveJavaType, toJsonArray, toJsonObjectpublic BigDecimalSerializer()
BigDecimal type.public java.math.BigDecimal initialize(java.lang.Class<? extends java.math.BigDecimal> definitionType)
Can be null for non-mutable instances.
initialize in class JavaTypeSerializer<java.math.BigDecimal>definitionType - The type as it appears at the parameter's definition.null for immutable types, a Java native value for native types or a new instance,
for mutable types.public java.math.BigDecimal fromJson(java.math.BigDecimal arg,
java.lang.String sval)
fromJson in class JavaTypeSerializer<java.math.BigDecimal>arg - The argument (obtained via initialize(java.lang.Class<? extends java.math.BigDecimal>).sval - The string JSON representation of this argument.public com.fasterxml.jackson.databind.JsonNode toJson(java.math.BigDecimal val)
toJson in class JavaTypeSerializer<java.math.BigDecimal>val - The instance to serialize.