Example usage for Java com.google.gson Gson fields, constructors, methods, implement or subclass
The text is from its open source code.
Excluder | excluder |
FieldNamingStrategy | fieldNamingStrategy |
Gson() Constructs a Gson object with default configuration. |
T | fromJson(String json, Class This method deserializes the specified Json into an object of the specified class. |
T | fromJson(String json, Type typeOfT) This method deserializes the specified Json into an object of the specified type. |
T | fromJson(Reader json, Class This method deserializes the Json read from the specified reader into an object of the specified class. |
T | fromJson(Reader json, Type typeOfT) This method deserializes the Json read from the specified reader into an object of the specified type. |
T | fromJson(JsonReader reader, Type typeOfT) Reads the next JSON value from reader and convert it to an object of type typeOfT . |
T | fromJson(JsonElement json, Class This method deserializes the Json read from the specified parse tree into an object of the specified type. |
T | fromJson(JsonElement json, Type typeOfT) This method deserializes the Json read from the specified parse tree into an object of the specified type. |
TypeAdapter | getAdapter(TypeToken Returns the type adapter for type. |
TypeAdapter | getAdapter(Class Returns the type adapter for type. |
TypeAdapter | getDelegateAdapter(TypeAdapterFactory skipPast, TypeToken This method is used to get an alternate type adapter for the specified type. |
JsonReader | newJsonReader(Reader reader) Returns a new JSON reader configured for the settings on this Gson instance. |
JsonWriter | newJsonWriter(Writer writer) Returns a new JSON writer configured for the settings on this Gson instance. |
String | toJson(Object src) This method serializes the specified object into its equivalent Json representation. |
String | toJson(JsonElement jsonElement) Converts a tree of JsonElement s into its equivalent JSON representation. |
void | toJson(Object src, Type typeOfSrc, Appendable writer) This method serializes the specified object, including those of generic types, into its equivalent Json representation. |
void | toJson(Object src, Type typeOfSrc, JsonWriter writer) Writes the JSON representation of src of type typeOfSrc to writer . |
String | toJson(Object src, Type typeOfSrc) This method serializes the specified object, including those of generic types, into its equivalent Json representation. |
void | toJson(Object src, Appendable writer) This method serializes the specified object into its equivalent Json representation. |
void | toJson(JsonElement jsonElement, Appendable writer) Writes out the equivalent JSON for a tree of JsonElement s. |
void | toJson(JsonElement jsonElement, JsonWriter writer) Writes the JSON for jsonElement to writer . |
JsonElement | toJsonTree(Object src) This method serializes the specified object into its equivalent representation as a tree of JsonElement s. |
JsonElement | toJsonTree(Object src, Type typeOfSrc) This method serializes the specified object, including those of generic types, into its equivalent representation as a tree of JsonElement s. |
String | toString() |