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':'static 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(String indent)Creates aFormattingStylewith the specified indent string.FormattingStyleFormattingStyle. withNewline(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). -
Uses of FormattingStyle in com.google.gson.stream
Methods 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.
-