public class JsonGrammar
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonGrammar.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
bareRootObject |
protected boolean |
bareSpecialNumerics |
protected boolean |
comments |
static JsonGrammar |
COMPACT
A grammar which will print compactified JSON readable by almost all vanilla json parsers.
|
static JsonGrammar |
JANKSON
A grammar which will accept all supported quirks, and output JSON-with-comments, which is a
valid jankson subset.
|
static JsonGrammar |
JSON5
A grammar which will accept JSON5 and output JSON-with-comments with trailing commas.
|
protected boolean |
printCommas |
protected boolean |
printTrailingCommas |
protected boolean |
printUnquotedKeys |
protected boolean |
printWhitespace |
static JsonGrammar |
STRICT
A grammar which will only accept or output strict JSON.
|
| Constructor and Description |
|---|
JsonGrammar() |
| Modifier and Type | Method and Description |
|---|---|
static JsonGrammar.Builder |
builder() |
boolean |
hasComments() |
boolean |
shouldOutputWhitespace() |
public static final JsonGrammar JANKSON
public static final JsonGrammar JSON5
public static final JsonGrammar STRICT
public static final JsonGrammar COMPACT
protected boolean comments
protected boolean printWhitespace
protected boolean printCommas
protected boolean printTrailingCommas
protected boolean bareSpecialNumerics
protected boolean bareRootObject
protected boolean printUnquotedKeys
public boolean hasComments()
public boolean shouldOutputWhitespace()
public static JsonGrammar.Builder builder()