public class DoubleSerializer extends Object implements ObjectSerializer
Modifier and Type | Field and Description |
---|---|
static DoubleSerializer |
instance |
Constructor and Description |
---|
DoubleSerializer() |
DoubleSerializer(DecimalFormat decimalFormat) |
DoubleSerializer(String decimalFormat) |
Modifier and Type | Method and Description |
---|---|
void |
write(JSONSerializer serializer,
Object object,
Object fieldName,
Type fieldType,
int features)
fastjson invokes this call-back method during serialization when it encounters a field of the
specified type.
|
public static final DoubleSerializer instance
public DoubleSerializer()
public DoubleSerializer(DecimalFormat decimalFormat)
public DoubleSerializer(String decimalFormat)
public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException
ObjectSerializer
write
in interface ObjectSerializer
object
- src the object that needs to be converted to Json.fieldName
- parent object field namefieldType
- parent object field typefeatures
- parent object field serializer featuresIOException
Copyright © 2012–2022 Alibaba Group. All rights reserved.