Java com.badlogic.gdx.utils Json fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.utils Json fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.utils Json.

The text is from its open source code.

Subclass

com.badlogic.gdx.utils.Json has subclasses.
Click this link to see all its subclasses.

Constructor

Method

voidaddClassTag(String tag, Class type)
Sets a tag to use instead of the fully qualifier class name.
TfromJson(Class type, Reader reader)
TfromJson(Class type, InputStream input)
TfromJson(Class type, FileHandle file)
TfromJson(Class type, String json)
TfromJson(Class type, Class elementType, Reader reader)
TfromJson(Class type, Class elementType, InputStream input)
TfromJson(Class type, Class elementType, FileHandle file)
TfromJson(Class type, Class elementType, String json)
SerializergetSerializer(Class type)
JsonWritergetWriter()
StringprettyPrint(Object object)
StringprettyPrint(String json)
StringprettyPrint(Object object, int singleLineColumns)
StringprettyPrint(String json, int singleLineColumns)
StringprettyPrint(Object object, PrettyPrintSettings settings)
StringprettyPrint(String json, PrettyPrintSettings settings)
voidreadFields(Object object, JsonValue jsonMap)
TreadValue(String name, Class type, T defaultValue, JsonValue jsonMap)
TreadValue(String name, Class type, Class elementType, JsonValue jsonMap)
TreadValue(Class type, Class elementType, T defaultValue, JsonValue jsonData)
TreadValue(String name, Class type, JsonValue jsonMap)
TreadValue(Class type, Class elementType, JsonValue jsonData)
TreadValue(Class type, JsonValue jsonData)
voidsetIgnoreUnknownFields(boolean ignoreUnknownFields)
When true, fields in the JSON that are not found on the class will not throw a SerializationException .
voidsetOutputType(OutputType outputType)
voidsetSerializer(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.
voidsetTypeName(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.
voidsetUsePrototypes(boolean usePrototypes)
When true, field values that are identical to a newly constructed instance are not written.
voidsetWriter(Writer writer)
Sets the writer where JSON output will be written.
StringtoJson(Object object, Class knownType)
voidtoJson(Object object, FileHandle file)
voidtoJson(Object object, Writer writer)
StringtoJson(Object object)
StringtoJson(Object object, Class knownType, Class elementType)
voidtoJson(Object object, Class knownType, FileHandle file)
voidtoJson(Object object, Class knownType, Writer writer)
voidwriteArrayEnd()
voidwriteArrayStart(String name)
voidwriteArrayStart()
voidwriteFields(Object object)
Writes all fields of the specified object to the current JSON object.
voidwriteObjectEnd()
voidwriteObjectStart(String name)
voidwriteObjectStart()
voidwriteObjectStart(Class actualType, Class knownType)
Starts writing an object, writing the actualType to a field if needed.
voidwriteType(Class type)
voidwriteValue(String name, Object value)
Writes the value as a field on the current JSON object, without writing the actual class.
voidwriteValue(Object value, Class knownType)
Writes the value, writing the class of the object if it differs from the specified known type.
voidwriteValue(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.
voidwriteValue(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.
voidwriteValue(Object value, Class knownType, Class elementType)
Writes the value, writing the class of the object if it differs from the specified known type.
voidwriteValue(Object value)
Writes the value, without writing the class of the object.