Package com.alibaba.fastjson2.writer
Class ObjectWriterRootName<T>
java.lang.Object
com.alibaba.fastjson2.writer.ObjectWriterAdapter<T>
com.alibaba.fastjson2.writer.ObjectWriterRootName<T>
- All Implemented Interfaces:
ObjectWriter<T>
-
Field Summary
Fields inherited from class com.alibaba.fastjson2.writer.ObjectWriterAdapter
fieldWriterArray, typeName, typeNameHash, typeNameJSONB, typeNameSymbolCache -
Constructor Summary
ConstructorsConstructorDescriptionObjectWriterRootName(Class<T> objectClass, String typeKey, String typeName, String rootName, long features, List<FieldWriter> fieldWriters) -
Method Summary
Modifier and TypeMethodDescriptiontoJSONObject(T object, long features) voidwrite(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) voidwriteJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Methods inherited from class com.alibaba.fastjson2.writer.ObjectWriterAdapter
errorOnNoneSerializable, getFeatures, getFieldWriter, getFieldWriters, hasFilter, hasFilter0, setNameFilter, setPropertyFilter, setPropertyPreFilter, setValueFilter, toJSONObject, toMap, toString, writeArrayMappingJSONB, writeClassInfo, writeTypeInfo, writeWithFilterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.alibaba.fastjson2.writer.ObjectWriter
getFieldValue, getFieldWriter, setFilter, toJSONString, write, writeArrayMapping, writeArrayMappingJSONB, writeWithFilter
-
Constructor Details
-
ObjectWriterRootName
-
-
Method Details
-
writeJSONB
public void writeJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) - Specified by:
writeJSONBin interfaceObjectWriter<T>- Overrides:
writeJSONBin classObjectWriterAdapter<T>
-
write
public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) - Specified by:
writein interfaceObjectWriter<T>- Overrides:
writein classObjectWriterAdapter<T>
-
toJSONObject
- Overrides:
toJSONObjectin classObjectWriterAdapter<T>
-