All Classes and Interfaces
Class
Description
A simple utility class used to check method Preconditions.
Static methods for working with types.
Adapt an array of objects.
Adapt a homogeneous collection of objects.
Returns a function that can construct an instance of a requested type.
Adapter for Date.
This type adapter supports subclasses of date by defining a
DefaultDateTypeAdapter.DateType
and then using its createAdapterFactory
methods.This class selects which fields and types to omit.
A strategy (or policy) definition that is used to decide whether or not a field or top-level
class should be serialized or deserialized as part of the JSON output/input.
An annotation that indicates this member should be exposed for JSON
serialization or deserialization.
A data object that stores attributes of a field.
An enumeration that defines a few standard naming conventions for JSON field names.
A mechanism for providing custom field naming in Gson.
This is the main class for using Gson.
Build configuration for Gson.
Use this builder to construct a
Gson
instance when you need to set configuration
options other than the default.This interface is implemented to create instances of a class that does not define a no-args
constructor.
Utilities methods for manipulating dates in iso8601 format.
Utility to check the major Java version of the current JVM.
An annotation that indicates the Gson
TypeAdapter
to use with a class
or field.Given a type T, looks for the annotation
JsonAdapter
and uses an instance of the
specified class as the default type adapter.A class representing an array type in Json.
Context for deserialization that is passed to a custom deserializer during invocation of its
JsonDeserializer.deserialize(JsonElement, Type, JsonDeserializationContext)
method.Interface representing a custom deserializer for Json.
A class representing an element of Json.
This exception is raised when Gson was unable to read an input stream
or write to one.
A class representing a Json
null
value.A class representing an object type in Json.
This exception is raised if there is a serious issue that occurs during parsing of a Json
string.
A parser to parse Json into a parse tree of
JsonElement
sA class representing a Json primitive value.
Reads a JSON (RFC 7159)
encoded value as a stream of tokens.
Internal-only APIs of JsonReader available only to other classes in Gson.
Context for serialization that is passed to a custom serializer during invocation of its
JsonSerializer.serialize(Object, Type, JsonSerializationContext)
method.Interface representing a custom serializer for Json.
A streaming parser that allows reading of multiple
JsonElement
s from the specified reader
asynchronously.This exception is raised when Gson attempts to read (or write) a malformed
JSON element.
A structure, name or value type in a JSON-encoded string.
This reader walks the elements of a JsonElement as if it was coming from a
character stream.
This writer creates a JsonElement.
Writes a JSON (RFC 7159)
encoded value to a stream, one token at a time.
This class holds a number value that is lazily converted to a specific number type
A map of comparable keys to values.
A map of comparable keys to values.
Defines the expected format for a
long
or Long
type when it is serialized.Thrown when a reader encounters malformed JSON.
Adapts maps to either JSON objects or JSON arrays.
Type adapter for
Number
.Defines a generic object construction factory.
Adapts types whose static type is only 'Object'.
Provides DateFormats for US locale with patterns which were the default ones before Java 9.
Contains static utility methods pertaining to primitive types and their
corresponding wrapper types.
Provides a replacement for
AccessibleObject.setAccessible(boolean)
, which may be used to
avoid reflective access issues appeared in Java 9, like InaccessibleObjectException
thrown or warnings likeType adapter that reflects over the fields and methods of a class.
An annotation that indicates this member should be serialized to JSON with
the provided name value as its field name.
An annotation that indicates the version number since a member or a type has been present.
Encapsulates access to
java.sql
types, to allow Gson to
work without the java.sql
module being present.Reads and writes GSON parse trees over streams.
Adapts a Gson 1.x tree-style adapter as a streaming TypeAdapter.
Converts Java objects to and from JSON.
Creates type adapters for set of related types.
Type adapters for basic types.
Represents a generic type
T
.Do sneaky things to allocate objects without invoking their constructors.
An annotation that indicates the version number until a member or a type should be present.