Package com.alibaba.fastjson2.writer
Class ObjectWriterImplMap
java.lang.Object
com.alibaba.fastjson2.writer.ObjectWriterPrimitiveImpl
com.alibaba.fastjson2.writer.ObjectWriterImplMap
- All Implemented Interfaces:
ObjectWriter
-
Constructor Summary
ConstructorsConstructorDescriptionObjectWriterImplMap(Class objectClass, long features) ObjectWriterImplMap(Type keyType, Type valueType, Class objectClass, Type objectType, long features) ObjectWriterImplMap(Type keyType, Type valueType, String format, Class objectClass, Type objectType, long features) -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectWriterImplMapstatic ObjectWriterImplMapstatic ObjectWriterImplMapstatic ObjectWriterImplMapvoidwrite(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.voidwriteArrayMappingJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Writes an object to the JSONWriter in array mapping JSONB format with additional parameters.voidwriteJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Writes an object to the JSONWriter in JSONB format.booleanwriteTypeInfo(JSONWriter jsonWriter) Writes type information to the JSON output.voidwriteWithFilter(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Writes an object to the JSONWriter with filter support.Methods inherited from class com.alibaba.fastjson2.writer.ObjectWriterPrimitiveImpl
getFunction, writeArrayMappingMethods 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, writeWithFilter
-
Constructor Details
-
ObjectWriterImplMap
-
ObjectWriterImplMap
-
ObjectWriterImplMap
-
-
Method Details
-
of
-
of
-
of
-
of
-
writeArrayMappingJSONB
public void writeArrayMappingJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Description copied from interface:ObjectWriterWrites an object to the JSONWriter in array mapping JSONB format with additional parameters.- Specified by:
writeArrayMappingJSONBin interfaceObjectWriter- Overrides:
writeArrayMappingJSONBin classObjectWriterPrimitiveImpl- 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
-
writeJSONB
public void writeJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Description copied from interface:ObjectWriterWrites an object to the JSONWriter in JSONB format.- 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
-
writeTypeInfo
Description copied from interface:ObjectWriterWrites type information to the JSON output. This is used for polymorphic serialization to include type information in the JSON output.- Parameters:
jsonWriter- the JSONWriter to which type information should be written- Returns:
- true if type information was written, false otherwise
-
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
-
writeWithFilter
public void writeWithFilter(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) Description copied from interface:ObjectWriterWrites an object to the JSONWriter with filter support.- 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
-