Package com.alibaba.fastjson2.writer
Class ObjectWriterImplToString
java.lang.Object
com.alibaba.fastjson2.writer.ObjectWriterPrimitiveImpl
com.alibaba.fastjson2.writer.ObjectWriterImplToString
- All Implemented Interfaces:
ObjectWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ObjectWriterImplToStringstatic final ObjectWriterImplToString -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Writes an object to the JSONWriter with the given field name, field type, and features.Methods inherited from class com.alibaba.fastjson2.writer.ObjectWriterPrimitiveImpl
getFunction, writeArrayMapping, writeArrayMappingJSONBMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.alibaba.fastjson2.writer.ObjectWriter
getFeatures, getFieldValue, getFieldWriter, getFieldWriter, getFieldWriters, hasFilter, setFilter, setNameFilter, setPropertyFilter, setPropertyPreFilter, setValueFilter, toJSONString, write, writeArrayMappingJSONB, writeJSONB, writeTypeInfo, writeWithFilter, writeWithFilter
-
Field Details
-
INSTANCE
-
DIRECT
-
-
Constructor Details
-
ObjectWriterImplToString
public ObjectWriterImplToString() -
ObjectWriterImplToString
public ObjectWriterImplToString(boolean direct)
-
-
Method Details
-
write
public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Description copied from interface:ObjectWriterWrites an object to the JSONWriter with the given field name, field type, and features.- Parameters:
jsonWriter- the JSONWriter to which the object should be writtenobject- the object to writefieldName- the name of the field being writtenfieldType- the type of the field being writtenfeatures- the features to use for writing
-