public static class JsonGrammar.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
JsonGrammar |
build()
Finalizes this JsonGrammar and returns it.
|
JsonGrammar.Builder |
printCommas(boolean commas)
Indicates whether commas should be output to make the result more readable.
|
JsonGrammar.Builder |
printTrailingCommas(boolean trailing)
If true, JSON5 trailing commas will be printed in all objects and lists.
|
JsonGrammar.Builder |
printWhitespace(boolean whitespace)
Indicates whether additional tabs and newlines should be printed to make json more
readable for humans.
|
JsonGrammar.Builder |
withComments(boolean comments)
Indicates that comments should be accepted as input, and preserved in output.
|
public JsonGrammar.Builder withComments(boolean comments)
public JsonGrammar.Builder printWhitespace(boolean whitespace)
public JsonGrammar.Builder printCommas(boolean commas)
public JsonGrammar.Builder printTrailingCommas(boolean trailing)
printCommas(boolean) is false. Defaults
to false.public JsonGrammar build()