Package | Description |
---|---|
com.google.gson |
This package provides the
Gson class to convert Json to Java and
vice-versa. |
com.google.gson.internal |
Do NOT use any class in this package as they are meant for internal use in Gson.
|
com.google.gson.internal.bind | |
com.google.gson.stream |
Modifier and Type | Method and Description |
---|---|
private JsonWriter |
Gson.newJsonWriter(java.io.Writer writer)
Returns a new JSON writer configured for this GSON and with the non-execute
prefix if that is configured.
|
Modifier and Type | Method and Description |
---|---|
void |
Gson.toJson(JsonElement jsonElement,
JsonWriter writer)
Writes the JSON for
jsonElement to writer . |
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 . |
void |
TreeTypeAdapter.write(JsonWriter out,
T value) |
void |
Gson.FutureTypeAdapter.write(JsonWriter out,
T value) |
abstract void |
TypeAdapter.write(JsonWriter out,
T value)
Writes one JSON value (an array, object, string, number, boolean or null)
for
value . |
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 | Class and Description |
---|---|
class |
JsonTreeWriter
This writer creates a JsonElement.
|
Modifier and Type | Method and Description |
---|---|
JsonWriter |
JsonTreeWriter.beginArray() |
JsonWriter |
JsonTreeWriter.beginObject() |
JsonWriter |
JsonTreeWriter.endArray() |
JsonWriter |
JsonTreeWriter.endObject() |
JsonWriter |
JsonTreeWriter.name(java.lang.String name) |
JsonWriter |
JsonTreeWriter.nullValue() |
JsonWriter |
JsonTreeWriter.value(boolean value) |
JsonWriter |
JsonTreeWriter.value(double value) |
JsonWriter |
JsonTreeWriter.value(long value) |
JsonWriter |
JsonTreeWriter.value(java.lang.Number value) |
JsonWriter |
JsonTreeWriter.value(java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
void |
CollectionTypeAdapterFactory.Adapter.write(JsonWriter out,
java.util.Collection<E> collection) |
void |
DateTypeAdapter.write(JsonWriter out,
java.util.Date value) |
void |
SqlDateTypeAdapter.write(JsonWriter out,
java.sql.Date value) |
void |
MapTypeAdapterFactory.Adapter.write(JsonWriter out,
java.util.Map<K,V> map) |
void |
ArrayTypeAdapter.write(JsonWriter out,
java.lang.Object array) |
void |
ObjectTypeAdapter.write(JsonWriter out,
java.lang.Object value) |
(package private) abstract void |
ReflectiveTypeAdapterFactory.BoundField.write(JsonWriter writer,
java.lang.Object value) |
void |
TypeAdapters.EnumTypeAdapter.write(JsonWriter out,
T value) |
void |
TypeAdapterRuntimeTypeWrapper.write(JsonWriter out,
T value) |
void |
ReflectiveTypeAdapterFactory.Adapter.write(JsonWriter out,
T value) |
void |
TimeTypeAdapter.write(JsonWriter out,
java.sql.Time value) |
Modifier and Type | Method and Description |
---|---|
JsonWriter |
JsonWriter.beginArray()
Begins encoding a new array.
|
JsonWriter |
JsonWriter.beginObject()
Begins encoding a new object.
|
private JsonWriter |
JsonWriter.close(int empty,
int nonempty,
java.lang.String closeBracket)
Closes the current scope by appending any necessary whitespace and the
given bracket.
|
JsonWriter |
JsonWriter.endArray()
Ends encoding the current array.
|
JsonWriter |
JsonWriter.endObject()
Ends encoding the current object.
|
JsonWriter |
JsonWriter.name(java.lang.String name)
Encodes the property name.
|
JsonWriter |
JsonWriter.nullValue()
Encodes
null . |
private JsonWriter |
JsonWriter.open(int empty,
java.lang.String openBracket)
Enters a new scope by appending any necessary whitespace and the given
bracket.
|
JsonWriter |
JsonWriter.value(boolean value)
Encodes
value . |
JsonWriter |
JsonWriter.value(double value)
Encodes
value . |
JsonWriter |
JsonWriter.value(long value)
Encodes
value . |
JsonWriter |
JsonWriter.value(java.lang.Number value)
Encodes
value . |
JsonWriter |
JsonWriter.value(java.lang.String value)
Encodes
value . |