Note that including details can be expensive in terms of calculating the caller.
The details include;
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private JsonGeneratorFactory |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JsonFormatter(final String
a string representation of a map to override keys keyOverrides)Creates a new JSON formatter. |
| public | JsonFormatter(final Map<StructuredFormatter.
a map of overrides for the default keys keyOverridesCreates a new JSON formatter. |
| Modifier and Type | Method and Description |
|---|---|
| protected StructuredFormatter. | createGenerator(final Writer writer)
Implements abstract org. Creates the generator used to create the structured data. |
| public boolean | Returns: true if pretty printing is enabled, otherwise falseIndicates whether or not pretty printing is enabled. |
| public void | setPrettyPrint(final boolean
true to turn on pretty printing or false to turn it offTurns on or off pretty printing. |
| config | back to summary |
|---|---|
| private final Map<String, Object> config | |
| factory | back to summary |
|---|---|
| private JsonGeneratorFactory factory | |
| JsonFormatter | back to summary |
|---|---|
| public JsonFormatter() Creates a new JSON formatter. | |
| JsonFormatter | back to summary |
|---|---|
| public JsonFormatter(final String keyOverrides) Creates a new JSON formatter.
| |
| JsonFormatter | back to summary |
|---|---|
| public JsonFormatter(final Map<StructuredFormatter. Creates a new JSON formatter.
| |
| createGenerator | back to summary |
|---|---|
| protected StructuredFormatter. Implements abstract org. Doc from org. Creates the generator used to create the structured data.
| |
| isPrettyPrint | back to summary |
|---|---|
| public boolean isPrettyPrint() Indicates whether or not pretty printing is enabled.
| |
| setPrettyPrint | back to summary |
|---|---|
| public void setPrettyPrint(final boolean prettyPrint) Turns on or off pretty printing.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final JsonGenerator |
| Access | Constructor and Description |
|---|---|
| private |
| generator | back to summary |
|---|---|
| private final JsonGenerator generator | |
| FormatterJsonGenerator | back to summary |
|---|---|
| private FormatterJsonGenerator(final JsonGenerator generator) | |
| add | back to summary |
|---|---|
| public StructuredFormatter. Overrides default org. Doc from org. Writes an integer value.
| |
| add | back to summary |
|---|---|
| public StructuredFormatter. Overrides default org. Doc from org. Writes a long value.
| |
| add | back to summary |
|---|---|
| public StructuredFormatter. Implements org. Doc from org. Writes a map value | |
| add | back to summary |
|---|---|
| public StructuredFormatter. Implements org. Doc from org. Writes a string value.
| |
| begin | back to summary |
|---|---|
| public StructuredFormatter. Overrides default org. Doc from org. Initial method invoked at the start of the generation.
| |
| end | back to summary |
|---|---|
| public StructuredFormatter. Implements org. Doc from org. Writes any trailing data that's needed.
| |
| endArray | back to summary |
|---|---|
| public StructuredFormatter. Overrides default org. Doc from org. Writes an end for an array. This defaults to
| |
| endObject | back to summary |
|---|---|
| public StructuredFormatter. Implements org. Doc from org. Writes an end to the object.
| |
| startArray | back to summary |
|---|---|
| public StructuredFormatter. Overrides default org. Doc from org. Writes the start of an array. This defaults to
| |
| startObject | back to summary |
|---|---|
| public StructuredFormatter. Implements org. Doc from org. Writes the start of an object.
If the
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(final String key, final Object obj) | |