Top Description Fields Constructors Methods
com.google.gson

public final Enum Strictness

extends Enum<Strictness>
Class Inheritance
Imports
com.google.gson.stream.JsonReader, .JsonWriter

Modes that indicate how strictly a JSON reader or writer follows the syntax laid out in the RFC 8259 JSON specification.

You can look at JsonReader#setStrictness(Strictness) to see how the strictness affects the JsonReader and you can look at JsonWriter#setStrictness(Strictness) to see how the strictness affects the JsonWriter.

Since
2.11.0
See Also
GsonBuilder#setStrictness(Strictness), JsonReader#setStrictness(Strictness), JsonWriter#setStrictness(Strictness)

Field Summary

Modifier and TypeField and Description
public static final Strictness
LEGACY_STRICT

Allow certain small deviations from the JSON specification for legacy reasons.

public static final Strictness
LENIENT

Allow large deviations from the JSON specification.

public static final Strictness
STRICT

Strict compliance with the JSON specification.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Strictness
public static Strictness[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

LEGACY_STRICTback to summary
public static final Strictness LEGACY_STRICT

Allow certain small deviations from the JSON specification for legacy reasons.

LENIENTback to summary
public static final Strictness LENIENT

Allow large deviations from the JSON specification.

STRICTback to summary
public static final Strictness STRICT

Strict compliance with the JSON specification.

Constructor Detail

Strictnessback to summary
private Strictness()

Method Detail

valueOfback to summary
public static Strictness valueOf(String name)
valuesback to summary
public static Strictness[] values()