com.alibaba.fastjson.serializer
Class JSONSerializer
java.lang.Object
com.alibaba.fastjson.serializer.JSONSerializer
public class JSONSerializer
- extends Object
- Author:
- wenshao
Method Summary |
void |
close()
|
void |
config(SerializerFeature feature,
boolean state)
|
boolean |
containsReference(Object value)
|
void |
decrementIdent()
|
SerialContext |
getContext()
|
DateFormat |
getDateFormat()
|
String |
getDateFormatPattern()
|
int |
getIndentCount()
|
SerializeConfig |
getMapping()
|
List<NameFilter> |
getNameFilters()
|
List<NameFilter> |
getNameFiltersDirect()
|
ObjectSerializer |
getObjectWriter(Class<?> clazz)
|
List<PropertyFilter> |
getPropertyFilters()
|
List<PropertyFilter> |
getPropertyFiltersDirect()
|
List<PropertyPreFilter> |
getPropertyPreFilters()
|
List<PropertyPreFilter> |
getPropertyPreFiltersDirect()
|
Collection<SerialContext> |
getReferences()
|
SerialContext |
getSerialContext(Object object)
|
List<ValueFilter> |
getValueFilters()
|
List<ValueFilter> |
getValueFiltersDirect()
|
SerializeWriter |
getWriter()
|
void |
incrementIndent()
|
boolean |
isEnabled(SerializerFeature feature)
|
boolean |
isWriteClassName()
|
boolean |
isWriteClassName(Type fieldType,
Object obj)
|
void |
popContext()
|
void |
println()
|
void |
setContext(Object object,
Object fieldName)
|
void |
setContext(SerialContext context)
|
void |
setContext(SerialContext parent,
Object object)
|
void |
setContext(SerialContext parent,
Object object,
Object fieldName)
|
void |
setDateFormat(DateFormat dateFormat)
|
void |
setDateFormat(String dateFormat)
|
String |
toString()
|
void |
write(Object object)
|
static void |
write(SerializeWriter out,
Object object)
|
void |
write(String text)
|
static void |
write(Writer out,
Object object)
|
void |
writeNull()
|
void |
writeReference(Object object)
|
void |
writeWithFieldName(Object object,
Object fieldName)
|
void |
writeWithFieldName(Object object,
Object fieldName,
Type fieldType)
|
void |
writeWithFormat(Object object,
String format)
|
JSONSerializer
public JSONSerializer()
JSONSerializer
public JSONSerializer(SerializeWriter out)
JSONSerializer
public JSONSerializer(SerializeConfig config)
JSONSerializer
@Deprecated
public JSONSerializer(JSONSerializerMap mapping)
- Deprecated.
JSONSerializer
public JSONSerializer(SerializeWriter out,
SerializeConfig config)
getDateFormatPattern
public String getDateFormatPattern()
getDateFormat
public DateFormat getDateFormat()
setDateFormat
public void setDateFormat(DateFormat dateFormat)
setDateFormat
public void setDateFormat(String dateFormat)
getContext
public SerialContext getContext()
setContext
public void setContext(SerialContext context)
setContext
public void setContext(SerialContext parent,
Object object,
Object fieldName)
setContext
public void setContext(Object object,
Object fieldName)
popContext
public void popContext()
setContext
public void setContext(SerialContext parent,
Object object)
isWriteClassName
public boolean isWriteClassName()
isWriteClassName
public final boolean isWriteClassName(Type fieldType,
Object obj)
getReferences
public Collection<SerialContext> getReferences()
getSerialContext
public SerialContext getSerialContext(Object object)
containsReference
public boolean containsReference(Object value)
writeReference
public void writeReference(Object object)
getValueFilters
public List<ValueFilter> getValueFilters()
getValueFiltersDirect
public List<ValueFilter> getValueFiltersDirect()
getIndentCount
public int getIndentCount()
incrementIndent
public void incrementIndent()
decrementIdent
public void decrementIdent()
println
public void println()
getNameFilters
public List<NameFilter> getNameFilters()
getNameFiltersDirect
public List<NameFilter> getNameFiltersDirect()
getPropertyPreFilters
public List<PropertyPreFilter> getPropertyPreFilters()
getPropertyPreFiltersDirect
public List<PropertyPreFilter> getPropertyPreFiltersDirect()
getPropertyFilters
public List<PropertyFilter> getPropertyFilters()
getPropertyFiltersDirect
public List<PropertyFilter> getPropertyFiltersDirect()
getWriter
public SerializeWriter getWriter()
toString
public String toString()
- Overrides:
toString
in class Object
config
public void config(SerializerFeature feature,
boolean state)
isEnabled
public boolean isEnabled(SerializerFeature feature)
writeNull
public void writeNull()
getMapping
public SerializeConfig getMapping()
write
public static final void write(Writer out,
Object object)
write
public static final void write(SerializeWriter out,
Object object)
write
public final void write(Object object)
writeWithFieldName
public final void writeWithFieldName(Object object,
Object fieldName)
writeWithFieldName
public final void writeWithFieldName(Object object,
Object fieldName,
Type fieldType)
writeWithFormat
public final void writeWithFormat(Object object,
String format)
write
public final void write(String text)
getObjectWriter
public ObjectSerializer getObjectWriter(Class<?> clazz)
close
public void close()
Copyright © 2012
Alibaba Group. All Rights Reserved.