Uses of Class
com.google.gson.FormattingStyle
Packages that use FormattingStyle
Package
Description
This package provides the
Gson class to convert Json to Java and
vice-versa.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 FormattingStyleModifier and TypeFieldDescriptionstatic final FormattingStyleFormattingStyle.COMPACTThe default compact formatting style: no newline no indent no space after','and':'static final 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 FormattingStyleModifier and TypeMethodDescriptionFormattingStyle.withIndent(String indent) Creates aFormattingStylewith the specified indent string.FormattingStyle.withNewline(String newline) Creates aFormattingStylewith the specified newline setting.FormattingStyle.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 FormattingStyleModifier and TypeMethodDescriptionGsonBuilder.setFormattingStyle(FormattingStyle formattingStyle) Configures Gson to output JSON that uses a certain kind of formatting style (for example newline and indent). -
Uses of FormattingStyle in com.google.gson.stream
Methods in com.google.gson.stream that return FormattingStyleModifier and TypeMethodDescriptionfinal FormattingStyleJsonWriter.getFormattingStyle()Returns the pretty printing style used by this writer.Methods in com.google.gson.stream with parameters of type FormattingStyleModifier and TypeMethodDescriptionfinal voidJsonWriter.setFormattingStyle(FormattingStyle formattingStyle) Sets the formatting style to be used in the encoded document.