Example usage for Java com.google.gson GsonBuilder fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | serializeNulls |
boolean | serializeSpecialFloatingPointValues |
boolean | generateNonExecutableJson |
GsonBuilder() Creates a GsonBuilder instance that can be used to build Gson with various configuration settings. |
GsonBuilder | addDeserializationExclusionStrategy(ExclusionStrategy strategy) Configures Gson to apply the passed in exclusion strategy during deserialization. |
GsonBuilder | addSerializationExclusionStrategy(ExclusionStrategy strategy) Configures Gson to apply the passed in exclusion strategy during serialization. |
Gson | create() Creates a Gson instance based on the current configuration. |
GsonBuilder | disableHtmlEscaping() By default, Gson escapes HTML characters such as < > etc. |
GsonBuilder | disableInnerClassSerialization() Configures Gson to exclude inner classes during serialization. |
GsonBuilder | enableComplexMapKeySerialization() Enabling this feature will only change the serialized form if the map key is a complex type (i.e. |
GsonBuilder | excludeFieldsWithModifiers(int... modifiers) Configures Gson to excludes all class fields that have the specified modifiers. |
GsonBuilder | excludeFieldsWithoutExposeAnnotation() Configures Gson to exclude all fields from consideration for serialization or deserialization that do not have the com.google.gson.annotations.Expose annotation. |
GsonBuilder | registerTypeAdapter(Type type, Object typeAdapter) Configures Gson for custom serialization or deserialization. |
GsonBuilder | registerTypeAdapterFactory(TypeAdapterFactory factory) Register a factory for type adapters. |
GsonBuilder | registerTypeHierarchyAdapter(Class> baseType, Object typeAdapter) Configures Gson for custom serialization or deserialization for an inheritance type hierarchy. |
GsonBuilder | setDateFormat(String pattern) Configures Gson to serialize Date objects according to the pattern provided. |
GsonBuilder | setDateFormat(int style) Configures Gson to to serialize Date objects according to the style value provided. |
GsonBuilder | setDateFormat(int dateStyle, int timeStyle) Configures Gson to to serialize Date objects according to the style value provided. |
GsonBuilder | setExclusionStrategies(ExclusionStrategy... strategies) Configures Gson to apply a set of exclusion strategies during both serialization and deserialization. |
GsonBuilder | setFieldNamingPolicy(FieldNamingPolicy namingConvention) Configures Gson to apply a specific naming policy to an object's field during serialization and deserialization. |
GsonBuilder | setFieldNamingStrategy(FieldNamingStrategy fieldNamingStrategy) Configures Gson to apply a specific naming policy strategy to an object's field during serialization and deserialization. |
GsonBuilder | setLenient() By default, Gson is strict and only accepts JSON as specified by RFC 4627. |
GsonBuilder | setLongSerializationPolicy(LongSerializationPolicy serializationPolicy) Configures Gson to apply a specific serialization policy for Long and long objects. |
GsonBuilder | setPrettyPrinting() Configures Gson to output Json that fits in a page for pretty printing. |
GsonBuilder | setVersion(double ignoreVersionsAfter) Configures Gson to enable versioning support. |