Package | Description |
---|---|
com.google.gson |
This package provides the
Gson class to convert Json to Java and
vice-versa. |
Modifier and Type | Method and Description |
---|---|
<T> T |
Gson.fromJson(JsonReader reader,
java.lang.reflect.Type typeOfT)
Reads the next JSON value from
reader and convert it to an object
of type typeOfT . |
<T> T |
Gson.fromJson(java.io.Reader json,
java.lang.Class<T> classOfT)
This method deserializes the Json read from the specified reader into an object of the
specified class.
|
<T> T |
Gson.fromJson(java.io.Reader json,
java.lang.reflect.Type typeOfT)
This method deserializes the Json read from the specified reader into an object of the
specified type.
|
JsonElement |
JsonParser.parse(JsonReader json)
Returns the next value from the JSON stream as a parse tree.
|
JsonElement |
JsonParser.parse(java.io.Reader json)
Parses the specified JSON string into a parse tree
|
void |
Gson.toJson(JsonElement jsonElement,
java.lang.Appendable writer)
Writes out the equivalent JSON for a tree of
JsonElement s. |
void |
Gson.toJson(JsonElement jsonElement,
JsonWriter writer)
Writes the JSON for
jsonElement to writer . |
void |
Gson.toJson(java.lang.Object src,
java.lang.Appendable writer)
This method serializes the specified object into its equivalent Json representation.
|
void |
Gson.toJson(java.lang.Object src,
java.lang.reflect.Type typeOfSrc,
java.lang.Appendable writer)
This method serializes the specified object, including those of generic types, into its
equivalent Json representation.
|
void |
Gson.toJson(java.lang.Object src,
java.lang.reflect.Type typeOfSrc,
JsonWriter writer)
Writes the JSON representation of
src of type typeOfSrc to
writer . |
Copyright © 2018. All Rights Reserved.