Uses of Class
com.google.gson.FormattingStyle
-
Packages that use FormattingStyle Package Description com.google.gson This package provides theGsonclass to convert Json to Java and vice-versa.com.google.gson.stream This package provides classes for processing JSON in an efficient streaming way. -
-
Uses of FormattingStyle in com.google.gson
Fields in com.google.gson declared as FormattingStyle Modifier and Type Field Description static FormattingStyleFormattingStyle. COMPACTThe default compact formatting style: no newline no indent no space after','and':'(package private) static FormattingStyleGson. DEFAULT_FORMATTING_STYLE(package private) FormattingStyleGson. formattingStyleprivate FormattingStyleGsonBuilder. formattingStylestatic FormattingStyleFormattingStyle. PRETTYThe default pretty printing formatting style:"\n"as newline two spaces as indent a space between':'and the subsequent valueMethods in com.google.gson that return FormattingStyle Modifier and Type Method Description FormattingStyleFormattingStyle. withIndent(java.lang.String indent)Creates aFormattingStylewith the specified indent string.FormattingStyleFormattingStyle. withNewline(java.lang.String newline)Creates aFormattingStylewith the specified newline setting.FormattingStyleFormattingStyle. withSpaceAfterSeparators(boolean spaceAfterSeparators)Creates aFormattingStylewhich either uses a space after the separators','and':'in the JSON output, or not.Methods in com.google.gson with parameters of type FormattingStyle Modifier and Type Method Description GsonBuilderGsonBuilder. setFormattingStyle(FormattingStyle formattingStyle)Configures Gson to output JSON that uses a certain kind of formatting style (for example newline and indent).Constructors in com.google.gson with parameters of type FormattingStyle Constructor Description Gson(Excluder excluder, FieldNamingStrategy fieldNamingStrategy, java.util.Map<java.lang.reflect.Type,InstanceCreator<?>> instanceCreators, boolean serializeNulls, boolean complexMapKeySerialization, boolean generateNonExecutableGson, boolean htmlSafe, FormattingStyle formattingStyle, Strictness strictness, boolean serializeSpecialFloatingPointValues, boolean useJdkUnsafe, LongSerializationPolicy longSerializationPolicy, java.lang.String datePattern, int dateStyle, int timeStyle, java.util.List<TypeAdapterFactory> builderFactories, java.util.List<TypeAdapterFactory> builderHierarchyFactories, java.util.List<TypeAdapterFactory> factoriesToBeAdded, ToNumberStrategy objectToNumberStrategy, ToNumberStrategy numberToNumberStrategy, java.util.List<ReflectionAccessFilter> reflectionFilters) -
Uses of FormattingStyle in com.google.gson.stream
Fields in com.google.gson.stream declared as FormattingStyle Modifier and Type Field Description private FormattingStyleJsonWriter. formattingStyleMethods in com.google.gson.stream that return FormattingStyle Modifier and Type Method Description FormattingStyleJsonWriter. getFormattingStyle()Returns the pretty printing style used by this writer.Methods in com.google.gson.stream with parameters of type FormattingStyle Modifier and Type Method Description voidJsonWriter. setFormattingStyle(FormattingStyle formattingStyle)Sets the formatting style to be used in the encoded document.
-