Package | Description |
---|---|
IO.JSON.Gson.com.google.gson |
This package provides the
com.google.gson.Gson class to convert Json to Java and
vice-versa. |
IO.JSON.Gson.com.google.gson.internal |
Do NOT use any class in this package as they are meant for internal use in Gson.
|
IO.JSON.Gson.com.google.gson.internal.bind |
Modifier and Type | Class and Description |
---|---|
class |
JsonArray
A class representing an array type in Json.
|
class |
JsonNull
A class representing a Json
null value. |
class |
JsonObject
A class representing an object type in Json.
|
class |
JsonPrimitive
A class representing a Json primitive value.
|
Modifier and Type | Method and Description |
---|---|
JsonElement |
JsonArray.get(int i)
Returns the ith element of the array.
|
JsonElement |
JsonObject.get(java.lang.String memberName)
Returns the member with the specified name.
|
JsonElement |
JsonStreamParser.next()
Returns the next available
JsonElement on the reader. |
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
|
JsonElement |
JsonParser.parse(java.lang.String json)
Parses the specified JSON string into a parse tree
|
JsonElement |
JsonArray.remove(int index)
Removes the element at the specified position in this array.
|
JsonElement |
JsonObject.remove(java.lang.String property)
Removes the
property from this JsonObject . |
abstract JsonElement |
LongSerializationPolicy.serialize(java.lang.Long value)
Serialize this
value using this serialization policy. |
JsonElement |
JsonSerializationContext.serialize(java.lang.Object src)
Invokes default serialization on the specified object.
|
JsonElement |
JsonSerializationContext.serialize(java.lang.Object src,
java.lang.reflect.Type typeOfSrc)
Invokes default serialization on the specified object passing the specific type information.
|
JsonElement |
JsonSerializer.serialize(T src,
java.lang.reflect.Type typeOfSrc,
JsonSerializationContext context)
Gson invokes this call-back method during serialization when it encounters a field of the
specified type.
|
JsonElement |
JsonArray.set(int index,
JsonElement element)
Replaces the element at the specified position in this array with the specified element.
|
JsonElement |
Gson.toJsonTree(java.lang.Object src)
This method serializes the specified object into its equivalent representation as a tree of
JsonElement s. |
JsonElement |
Gson.toJsonTree(java.lang.Object src,
java.lang.reflect.Type typeOfSrc)
This method serializes the specified object, including those of generic types, into its
equivalent representation as a tree of
JsonElement s. |
JsonElement |
TypeAdapter.toJsonTree(T value)
Converts
value to a JSON tree. |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.util.Map.Entry<java.lang.String,JsonElement>> |
JsonObject.entrySet()
Returns a set of members of this object.
|
java.util.Iterator<JsonElement> |
JsonArray.iterator()
Returns an iterator to navigate the elements of the array.
|
Modifier and Type | Method and Description |
---|---|
void |
JsonArray.add(JsonElement element)
Adds the specified element to self.
|
void |
JsonObject.add(java.lang.String property,
JsonElement value)
Adds a member, which is a name-value pair, to self.
|
boolean |
JsonArray.contains(JsonElement element)
Returns true if this array contains the specified element.
|
<T> T |
JsonDeserializationContext.deserialize(JsonElement json,
java.lang.reflect.Type typeOfT)
Invokes default deserialization on the specified object.
|
T |
JsonDeserializer.deserialize(JsonElement json,
java.lang.reflect.Type typeOfT,
JsonDeserializationContext context)
Gson invokes this call-back method during deserialization when it encounters a field of the
specified type.
|
<T> T |
Gson.fromJson(JsonElement json,
java.lang.Class<T> classOfT)
This method deserializes the Json read from the specified parse tree into an object of the
specified type.
|
<T> T |
Gson.fromJson(JsonElement json,
java.lang.reflect.Type typeOfT)
This method deserializes the Json read from the specified parse tree into an object of the
specified type.
|
T |
TypeAdapter.fromJsonTree(JsonElement jsonTree)
Converts
jsonTree to a Java object. |
boolean |
JsonArray.remove(JsonElement element)
Removes the first occurrence of the specified element from this array, if it is present.
|
JsonElement |
JsonArray.set(int index,
JsonElement element)
Replaces the element at the specified position in this array with the specified element.
|
java.lang.String |
Gson.toJson(JsonElement jsonElement)
Converts a tree of
JsonElement s into its equivalent JSON representation. |
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 . |
Modifier and Type | Method and Description |
---|---|
static JsonElement |
Streams.parse(JsonReader reader)
Takes a reader in any state and returns the next value as a JsonElement.
|
Modifier and Type | Method and Description |
---|---|
static void |
Streams.write(JsonElement element,
JsonWriter writer)
Writes the JSON element to the writer, recursively.
|
Modifier and Type | Field and Description |
---|---|
static TypeAdapter<JsonElement> |
TypeAdapters.JSON_ELEMENT |
Modifier and Type | Method and Description |
---|---|
JsonElement |
JsonTreeWriter.get()
Returns the top level object produced by this writer.
|
Constructor and Description |
---|
JsonTreeReader(JsonElement element) |