void | addClassTag(String tag, Class type) Sets a tag to use instead of the fully qualifier class name. |
T | fromJson(Class type, Reader reader)
|
T | fromJson(Class type, InputStream input)
|
T | fromJson(Class type, FileHandle file)
|
T | fromJson(Class type, String json)
|
T | fromJson(Class type, Class elementType, Reader reader)
|
T | fromJson(Class type, Class elementType, InputStream input)
|
T | fromJson(Class type, Class elementType, FileHandle file)
|
T | fromJson(Class type, Class elementType, String json)
|
Serializer | getSerializer(Class type)
|
JsonWriter | getWriter()
|
String | prettyPrint(Object object)
|
String | prettyPrint(String json)
|
String | prettyPrint(Object object, int singleLineColumns)
|
String | prettyPrint(String json, int singleLineColumns)
|
String | prettyPrint(Object object, PrettyPrintSettings settings)
|
String | prettyPrint(String json, PrettyPrintSettings settings)
|
void | readFields(Object object, JsonValue jsonMap)
|
T | readValue(String name, Class type, T defaultValue, JsonValue jsonMap)
|
T | readValue(String name, Class type, Class elementType, JsonValue jsonMap)
|
T | readValue(Class type, Class elementType, T defaultValue, JsonValue jsonData)
|
T | readValue(String name, Class type, JsonValue jsonMap)
|
T | readValue(Class type, Class elementType, JsonValue jsonData)
|
T | readValue(Class type, JsonValue jsonData)
|
void | setIgnoreUnknownFields(boolean ignoreUnknownFields) When true, fields in the JSON that are not found on the class will not throw a SerializationException . |
void | setOutputType(OutputType outputType)
|
void | setSerializer(Class type, Serializer serializer) Registers a serializer to use for the specified type instead of the default behavior of serializing all of an objects fields. |
void | setTypeName(String typeName) Sets the name of the JSON field to store the Java class name or class tag when required to avoid ambiguity during deserialization. |
void | setUsePrototypes(boolean usePrototypes) When true, field values that are identical to a newly constructed instance are not written. |
void | setWriter(Writer writer) Sets the writer where JSON output will be written. |
String | toJson(Object object, Class knownType)
|
void | toJson(Object object, FileHandle file)
|
void | toJson(Object object, Writer writer)
|
String | toJson(Object object)
|
String | toJson(Object object, Class knownType, Class elementType)
|
void | toJson(Object object, Class knownType, FileHandle file)
|
void | toJson(Object object, Class knownType, Writer writer)
|
void | writeArrayEnd()
|
void | writeArrayStart(String name)
|
void | writeArrayStart()
|
void | writeFields(Object object) Writes all fields of the specified object to the current JSON object. |
void | writeObjectEnd()
|
void | writeObjectStart(String name)
|
void | writeObjectStart()
|
void | writeObjectStart(Class actualType, Class knownType) Starts writing an object, writing the actualType to a field if needed. |
void | writeType(Class type)
|
void | writeValue(String name, Object value) Writes the value as a field on the current JSON object, without writing the actual class. |
void | writeValue(Object value, Class knownType) Writes the value, writing the class of the object if it differs from the specified known type. |
void | writeValue(String name, Object value, Class knownType, Class elementType) Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified known type. |
void | writeValue(String name, Object value, Class knownType) Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified known type. |
void | writeValue(Object value, Class knownType, Class elementType) Writes the value, writing the class of the object if it differs from the specified known type. |
void | writeValue(Object value) Writes the value, without writing the class of the object. |