Java com.google.gson GsonBuilder fields, constructors, methods, implement or subclass

Example usage for Java com.google.gson GsonBuilder fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.gson GsonBuilder.

The text is from its open source code.

Subclass

com.google.gson.GsonBuilder has subclasses.
Click this link to see all its subclasses.

Field

Constructor

GsonBuilder()
Creates a GsonBuilder instance that can be used to build Gson with various configuration settings.

Method

GsonBuilderaddDeserializationExclusionStrategy(ExclusionStrategy strategy)
Configures Gson to apply the passed in exclusion strategy during deserialization.
GsonBuilderaddSerializationExclusionStrategy(ExclusionStrategy strategy)
Configures Gson to apply the passed in exclusion strategy during serialization.
Gsoncreate()
Creates a Gson instance based on the current configuration.
GsonBuilderdisableHtmlEscaping()
By default, Gson escapes HTML characters such as < > etc.
GsonBuilderdisableInnerClassSerialization()
Configures Gson to exclude inner classes during serialization.
GsonBuilderenableComplexMapKeySerialization()
Enabling this feature will only change the serialized form if the map key is a complex type (i.e.
GsonBuilderexcludeFieldsWithModifiers(int... modifiers)
Configures Gson to excludes all class fields that have the specified modifiers.
GsonBuilderexcludeFieldsWithoutExposeAnnotation()
Configures Gson to exclude all fields from consideration for serialization or deserialization that do not have the com.google.gson.annotations.Expose annotation.
GsonBuilderregisterTypeAdapter(Type type, Object typeAdapter)
Configures Gson for custom serialization or deserialization.
GsonBuilderregisterTypeAdapterFactory(TypeAdapterFactory factory)
Register a factory for type adapters.
GsonBuilderregisterTypeHierarchyAdapter(Class baseType, Object typeAdapter)
Configures Gson for custom serialization or deserialization for an inheritance type hierarchy.
GsonBuildersetDateFormat(String pattern)
Configures Gson to serialize Date objects according to the pattern provided.
GsonBuildersetDateFormat(int style)
Configures Gson to to serialize Date objects according to the style value provided.
GsonBuildersetDateFormat(int dateStyle, int timeStyle)
Configures Gson to to serialize Date objects according to the style value provided.
GsonBuildersetExclusionStrategies(ExclusionStrategy... strategies)
Configures Gson to apply a set of exclusion strategies during both serialization and deserialization.
GsonBuildersetFieldNamingPolicy(FieldNamingPolicy namingConvention)
Configures Gson to apply a specific naming policy to an object's field during serialization and deserialization.
GsonBuildersetFieldNamingStrategy(FieldNamingStrategy fieldNamingStrategy)
Configures Gson to apply a specific naming policy strategy to an object's field during serialization and deserialization.
GsonBuildersetLenient()
By default, Gson is strict and only accepts JSON as specified by RFC 4627.
GsonBuildersetLongSerializationPolicy(LongSerializationPolicy serializationPolicy)
Configures Gson to apply a specific serialization policy for Long and long objects.
GsonBuildersetPrettyPrinting()
Configures Gson to output Json that fits in a page for pretty printing.
GsonBuildersetVersion(double ignoreVersionsAfter)
Configures Gson to enable versioning support.