com.alibaba.fastjson.serializer
Class ToStringSerializer
- java.lang.Object
-
- com.alibaba.fastjson.serializer.ToStringSerializer
-
- All Implemented Interfaces:
- ObjectSerializer
public class ToStringSerializer extends Object implements ObjectSerializer
-
Field Summary
Fields Modifier and Type Field and Description static ToStringSerializer
instance
Constructor Summary
Constructors Constructor and Description ToStringSerializer()
Method Summary
All Methods Instance Methods Concrete Methods 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.
-
Field Detail
instance
public static final ToStringSerializer instance
Method Detail
write
public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException
Description copied from interface:ObjectSerializer
fastjson invokes this call-back method during serialization when it encounters a field of the specified type.- Specified by:
-
write
in interfaceObjectSerializer
-
object
- src the object that needs to be converted to Json. -
fieldName
- parent object field name -
fieldType
- parent object field type -
features
- parent object field serializer features - Throws:
-
IOException
Copyright © 2012–2021 Alibaba Group. All rights reserved.