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