Package | Description |
---|---|
com.fasterxml.jackson.core |
Main public API classes of the core streaming JSON
processor: most importantly
JsonFactory
used for constructing
JSON parser (JsonParser )
and generator
(JsonGenerator )
instances. |
com.fasterxml.jackson.core.base |
Base classes used by concrete Parser and Generator implementations;
contain functionality that is not specific to JSON or input
abstraction (byte vs char).
|
com.fasterxml.jackson.core.util |
Utility classes used by Jackson Core functionality.
|
com.fasterxml.jackson.databind |
Basic data binding (mapping) functionality that
allows for reading JSON content into Java Objects (POJOs)
and JSON Trees (
JsonNode ), as well as
writing Java Objects and trees as JSON. |
Modifier and Type | Field and Description |
---|---|
protected PrettyPrinter |
JsonGenerator._cfgPrettyPrinter
Object that handles pretty-printing (usually additional
white space to make results more human-readable) during
output.
|
Modifier and Type | Method and Description |
---|---|
PrettyPrinter |
JsonGenerator.getPrettyPrinter()
Accessor for checking whether this generator has a configured
PrettyPrinter ; returns it if so, null if none configured. |
Modifier and Type | Method and Description |
---|---|
JsonGenerator |
JsonGenerator.setPrettyPrinter(PrettyPrinter pp)
Method for setting a custom pretty printer, which is usually
used to add indentation for improved human readability.
|
Modifier and Type | Method and Description |
---|---|
protected PrettyPrinter |
GeneratorBase._constructDefaultPrettyPrinter()
Overridable factory method called to instantiate an appropriate
PrettyPrinter
for case of "just use the default one", when GeneratorBase.useDefaultPrettyPrinter() is called. |
Modifier and Type | Class and Description |
---|---|
class |
DefaultPrettyPrinter
Default
PrettyPrinter implementation that uses 2-space
indentation with platform-default linefeeds. |
class |
MinimalPrettyPrinter
PrettyPrinter implementation that adds no indentation,
just implements everything necessary for value output to work
as expected, and provide simpler extension points to allow
for creating simple custom implementations that add specific
decoration or overrides. |
Modifier and Type | Method and Description |
---|---|
PrettyPrinter |
JsonGeneratorDelegate.getPrettyPrinter() |
Modifier and Type | Method and Description |
---|---|
JsonGenerator |
JsonGeneratorDelegate.setPrettyPrinter(PrettyPrinter pp) |
Modifier and Type | Field and Description |
---|---|
protected PrettyPrinter |
SerializationConfig._defaultPrettyPrinter
If "default pretty-printing" is enabled, it will create the instance
from this blueprint object.
|
protected static PrettyPrinter |
SerializationConfig.DEFAULT_PRETTY_PRINTER |
protected static PrettyPrinter |
ObjectWriter.NULL_PRETTY_PRINTER
We need to keep track of explicit disabling of pretty printing;
easiest to do by a token value.
|
PrettyPrinter |
ObjectWriter.GeneratorSettings.prettyPrinter
To allow for dynamic enabling/disabling of pretty printing,
pretty printer can be optionally configured for writer
as well
|
Modifier and Type | Method and Description |
---|---|
PrettyPrinter |
SerializationConfig.constructDefaultPrettyPrinter() |
PrettyPrinter |
SerializationConfig.getDefaultPrettyPrinter()
Accessor for configured blueprint "default"
PrettyPrinter to
use, if default pretty-printing is enabled. |
Modifier and Type | Method and Description |
---|---|
protected ObjectWriter |
ObjectMapper._newWriter(SerializationConfig config,
JavaType rootType,
PrettyPrinter pp)
Factory method sub-classes must override, to produce
ObjectWriter
instances of proper sub-type |
ObjectMapper |
ObjectMapper.setDefaultPrettyPrinter(PrettyPrinter pp)
Method for specifying
PrettyPrinter to use when "default pretty-printing"
is enabled (by enabling SerializationFeature.INDENT_OUTPUT ) |
ObjectWriter |
ObjectWriter.with(PrettyPrinter pp)
Method that will construct a new instance that will use specified pretty
printer (or, if null, will not do any pretty-printing)
|
ObjectWriter.GeneratorSettings |
ObjectWriter.GeneratorSettings.with(PrettyPrinter pp) |
SerializationConfig |
SerializationConfig.withDefaultPrettyPrinter(PrettyPrinter pp) |
ObjectWriter |
ObjectMapper.writer(PrettyPrinter pp)
Factory method for constructing
ObjectWriter that will
serialize objects using specified pretty printer for indentation
(or if null, no pretty printer) |
Constructor and Description |
---|
GeneratorSettings(PrettyPrinter pp,
FormatSchema sch,
CharacterEscapes esc,
SerializableString rootSep) |
ObjectWriter(ObjectMapper mapper,
SerializationConfig config,
JavaType rootType,
PrettyPrinter pp)
Constructor used by
ObjectMapper for initial instantiation |
SerializationConfig(SerializationConfig src,
PrettyPrinter defaultPP) |
Copyright © 2019 JBoss by Red Hat. All rights reserved.