Uses of Class
com.fasterxml.jackson.core.JsonGenerator
Packages that use JsonGenerator
Package
Description
Main public API classes of the core streaming JSON
processor: most importantly
JsonFactory
used for constructing
JSON parser (JsonParser
)
and generator
(JsonGenerator
)
instances.Base classes used by concrete Parser and Generator implementations;
contain functionality that is not specific to JSON or input
abstraction (byte vs char).
Package for some of
JsonProcessingException
subtypes contained by streaming API.JSON-specific parser and generator implementation classes that
Jackson defines and uses.
Utility classes used by Jackson Core functionality.
-
Uses of JsonGenerator in com.fasterxml.jackson.core
Methods in com.fasterxml.jackson.core that return JsonGeneratorModifier and TypeMethodDescriptionprotected JsonGenerator
JsonFactory._createGenerator
(Writer out, IOContext ctxt) Overridable factory method that actually instantiates generator for givenWriter
and context object.protected JsonGenerator
JsonFactory._createUTF8Generator
(OutputStream out, IOContext ctxt) Overridable factory method that actually instantiates generator for givenOutputStream
and context object, using UTF-8 encoding.protected JsonGenerator
JsonFactory._decorate
(JsonGenerator g) Helper method for applying all registeredJsonGeneratorDecorator
s on freshly constructedJsonGenerator
.final JsonGenerator
JsonGenerator.configure
(JsonGenerator.Feature f, boolean state) Method for enabling or disabling specified feature: checkJsonGenerator.Feature
for list of available features.JsonFactory.createGenerator
(DataOutput out) Convenience method for constructing generator that uses default encoding of the format (UTF-8 for JSON and most other data formats).JsonFactory.createGenerator
(DataOutput out, JsonEncoding enc) Method for constructing generator for writing content using specifiedDataOutput
instance.JsonFactory.createGenerator
(File f, JsonEncoding enc) Method for constructing JSON generator for writing JSON content to specified file, overwriting contents it might have (or creating it if such file does not yet exist).JsonFactory.createGenerator
(OutputStream out) Convenience method for constructing generator that uses default encoding of the format (UTF-8 for JSON and most other data formats).JsonFactory.createGenerator
(OutputStream out, JsonEncoding enc) Method for constructing JSON generator for writing JSON content using specified output stream.JsonFactory.createGenerator
(Writer w) Method for constructing JSON generator for writing JSON content using specified Writer.abstract JsonGenerator
TokenStreamFactory.createGenerator
(DataOutput out) abstract JsonGenerator
TokenStreamFactory.createGenerator
(DataOutput out, JsonEncoding enc) abstract JsonGenerator
TokenStreamFactory.createGenerator
(File f, JsonEncoding enc) abstract JsonGenerator
TokenStreamFactory.createGenerator
(OutputStream out) abstract JsonGenerator
TokenStreamFactory.createGenerator
(OutputStream out, JsonEncoding enc) abstract JsonGenerator
TokenStreamFactory.createGenerator
(Writer w) JsonFactory.createJsonGenerator
(OutputStream out) Deprecated.JsonFactory.createJsonGenerator
(OutputStream out, JsonEncoding enc) Deprecated.Since 2.2, useJsonFactory.createGenerator(OutputStream, JsonEncoding)
instead.JsonFactory.createJsonGenerator
(Writer out) Deprecated.Since 2.2, useJsonFactory.createGenerator(Writer)
instead.abstract JsonGenerator
JsonGenerator.disable
(JsonGenerator.Feature f) Method for disabling specified feature (checkJsonGenerator.Feature
for list of features)abstract JsonGenerator
JsonGenerator.enable
(JsonGenerator.Feature f) Method for enabling specified generator feature: checkJsonGenerator.Feature
for list of available features.JsonGenerationException.getProcessor()
JsonGenerator.overrideFormatFeatures
(int values, int mask) Bulk set method for (re)setting states ofFormatFeature
s, by specifying values (set / clear) along with a mask, to determine which features to change, if any.JsonGenerator.overrideStdFeatures
(int values, int mask) Bulk set method for (re)setting states of features specified bymask
.JsonGenerator.setCharacterEscapes
(CharacterEscapes esc) Method for defining custom escapes factory uses forJsonGenerator
s it creates.abstract JsonGenerator
JsonGenerator.setCodec
(ObjectCodec oc) Method that can be called to set or reset the object to use for writing Java objects as JsonContent (using methodwriteObject(java.lang.Object)
).abstract JsonGenerator
JsonGenerator.setFeatureMask
(int values) Deprecated.Since 2.7, useoverrideStdFeatures(int, int)
instead -- remove from 2.9JsonGenerator.setHighestNonEscapedChar
(int charCode) Method that can be called to request that generator escapes all character codes above specified code point (if positive value); or, to not escape any characters except for ones that must be escaped for the data format (if -1).JsonGenerator.setPrettyPrinter
(PrettyPrinter pp) Method for setting a custom pretty printer, which is usually used to add indentation for improved human readability.JsonGenerator.setRootValueSeparator
(SerializableString sep) Method that allows overriding String used for separating root-level JSON values (default is single space character)abstract JsonGenerator
JsonGenerator.useDefaultPrettyPrinter()
Convenience method for enabling pretty-printing using the default pretty printer (DefaultPrettyPrinter
).Methods in com.fasterxml.jackson.core with parameters of type JsonGeneratorModifier and TypeMethodDescriptionprotected JsonGenerator
JsonFactory._decorate
(JsonGenerator g) Helper method for applying all registeredJsonGeneratorDecorator
s on freshly constructedJsonGenerator
.void
PrettyPrinter.beforeArrayValues
(JsonGenerator gen) Method called after array start marker has been output, and right before the first value is to be output.void
PrettyPrinter.beforeObjectEntries
(JsonGenerator gen) Method called after object start marker has been output, and right before the field name of the first entry is to be output.JsonGenerationException.withGenerator
(JsonGenerator g) Fluent method that may be used to assign originatingJsonGenerator
, to be accessed usingJsonGenerationException.getProcessor()
.void
PrettyPrinter.writeArrayValueSeparator
(JsonGenerator gen) Method called after an array value has been completely output, and before another value is to be output.void
PrettyPrinter.writeEndArray
(JsonGenerator gen, int nrOfValues) Method called after an Array value has been completely output (minus closing bracket).void
PrettyPrinter.writeEndObject
(JsonGenerator gen, int nrOfEntries) Method called after an Object value has been completely output (minus closing curly bracket).void
PrettyPrinter.writeObjectEntrySeparator
(JsonGenerator gen) Method called after an Object entry (field:value) has been completely output, and before another value is to be output.void
PrettyPrinter.writeObjectFieldValueSeparator
(JsonGenerator gen) Method called after an object field has been output, but before the value is output.void
PrettyPrinter.writeRootValueSeparator
(JsonGenerator gen) Method called after a root-level value has been completely output, and before another value is to be output.void
PrettyPrinter.writeStartArray
(JsonGenerator gen) Method called when an Array value is to be output, before any member/child values are output.void
PrettyPrinter.writeStartObject
(JsonGenerator gen) Method called when an Object value is to be output, before any fields are output.abstract void
ObjectCodec.writeTree
(JsonGenerator gen, TreeNode tree) Method for serializing JSON content from given Tree instance, using specified generator.abstract void
TreeCodec.writeTree
(JsonGenerator g, TreeNode tree) abstract void
ObjectCodec.writeValue
(JsonGenerator gen, Object value) Method to serialize given Java Object, using generator provided.Constructors in com.fasterxml.jackson.core with parameters of type JsonGeneratorModifierConstructorDescriptionJsonGenerationException
(String msg, Throwable rootCause, JsonGenerator g) JsonGenerationException
(Throwable rootCause, JsonGenerator g) -
Uses of JsonGenerator in com.fasterxml.jackson.core.base
Subclasses of JsonGenerator in com.fasterxml.jackson.core.baseModifier and TypeClassDescriptionclass
This base class implements part of API that a JSON generator exposes to applications, adds shared internal methods that sub-classes can use and adds some abstract methods sub-classes must implement.Methods in com.fasterxml.jackson.core.base that return JsonGeneratorModifier and TypeMethodDescriptionGeneratorBase.disable
(JsonGenerator.Feature f) GeneratorBase.enable
(JsonGenerator.Feature f) GeneratorBase.overrideStdFeatures
(int values, int mask) GeneratorBase.setCodec
(ObjectCodec oc) GeneratorBase.setFeatureMask
(int newMask) Deprecated.GeneratorBase.useDefaultPrettyPrinter()
-
Uses of JsonGenerator in com.fasterxml.jackson.core.exc
Fields in com.fasterxml.jackson.core.exc declared as JsonGeneratorMethods in com.fasterxml.jackson.core.exc that return JsonGeneratorMethods in com.fasterxml.jackson.core.exc with parameters of type JsonGeneratorModifier and TypeMethodDescriptionabstract StreamWriteException
StreamWriteException.withGenerator
(JsonGenerator g) Fluent method that may be used to assign originatingJsonGenerator
, to be accessed usingStreamWriteException.getProcessor()
.Constructors in com.fasterxml.jackson.core.exc with parameters of type JsonGeneratorModifierConstructorDescriptionprotected
StreamWriteException
(String msg, JsonGenerator g) protected
StreamWriteException
(String msg, Throwable rootCause, JsonGenerator g) protected
StreamWriteException
(Throwable rootCause, JsonGenerator g) -
Uses of JsonGenerator in com.fasterxml.jackson.core.filter
Subclasses of JsonGenerator in com.fasterxml.jackson.core.filterModifier and TypeClassDescriptionclass
SpecializedJsonGeneratorDelegate
that allows use ofTokenFilter
for outputting a subset of content that caller tries to generate.Methods in com.fasterxml.jackson.core.filter with parameters of type JsonGeneratorModifier and TypeMethodDescriptionTokenFilterContext.closeArray
(JsonGenerator gen) TokenFilterContext.closeObject
(JsonGenerator gen) void
TokenFilterContext.ensureFieldNameWritten
(JsonGenerator gen) Method called to ensure that field name, if present, has been written; may result (but does not always) in a call using given generatorvoid
TokenFilterContext.writePath
(JsonGenerator gen) Method called to ensure that parent path from root is written up to and including this node.Constructors in com.fasterxml.jackson.core.filter with parameters of type JsonGeneratorModifierConstructorDescriptionFilteringGeneratorDelegate
(JsonGenerator d, TokenFilter f, boolean includePath, boolean allowMultipleMatches) Deprecated.since 2.12 Use the constructor that takesTokenFilter.Inclusion
argument instead.FilteringGeneratorDelegate
(JsonGenerator d, TokenFilter f, TokenFilter.Inclusion inclusion, boolean allowMultipleMatches) -
Uses of JsonGenerator in com.fasterxml.jackson.core.json
Subclasses of JsonGenerator in com.fasterxml.jackson.core.jsonModifier and TypeClassDescriptionclass
Intermediate base class shared by JSON-backed generators likeUTF8JsonGenerator
andWriterBasedJsonGenerator
.class
class
JsonGenerator
that outputs JSON content using aWriter
which handles character encoding.Methods in com.fasterxml.jackson.core.json that return JsonGeneratorModifier and TypeMethodDescriptionJsonGeneratorImpl.disable
(JsonGenerator.Feature f) JsonGeneratorImpl.enable
(JsonGenerator.Feature f) JsonGeneratorImpl.setCharacterEscapes
(CharacterEscapes esc) JsonGeneratorImpl.setHighestNonEscapedChar
(int charCode) JsonGeneratorImpl.setRootValueSeparator
(SerializableString sep) Methods in com.fasterxml.jackson.core.json with parameters of type JsonGenerator -
Uses of JsonGenerator in com.fasterxml.jackson.core.util
Subclasses of JsonGenerator in com.fasterxml.jackson.core.utilFields in com.fasterxml.jackson.core.util declared as JsonGeneratorModifier and TypeFieldDescriptionprotected JsonGenerator
JsonGeneratorDelegate.delegate
Delegate object that method calls are delegated to.Methods in com.fasterxml.jackson.core.util that return JsonGeneratorModifier and TypeMethodDescriptionJsonGeneratorDecorator.decorate
(JsonFactory factory, JsonGenerator generator) Allow to decorateJsonGenerator
instances returned byJsonFactory
.JsonGeneratorDelegate.delegate()
JsonGeneratorDelegate.disable
(JsonGenerator.Feature f) JsonGeneratorDelegate.enable
(JsonGenerator.Feature f) JsonGeneratorDelegate.getDelegate()
Deprecated.JsonGeneratorDelegate.overrideFormatFeatures
(int values, int mask) JsonGeneratorDelegate.overrideStdFeatures
(int values, int mask) JsonGeneratorDelegate.setCharacterEscapes
(CharacterEscapes esc) JsonGeneratorDelegate.setCodec
(ObjectCodec oc) JsonGeneratorDelegate.setFeatureMask
(int mask) Deprecated.JsonGeneratorDelegate.setHighestNonEscapedChar
(int charCode) JsonGeneratorDelegate.setPrettyPrinter
(PrettyPrinter pp) JsonGeneratorDelegate.setRootValueSeparator
(SerializableString sep) JsonGeneratorDelegate.useDefaultPrettyPrinter()
Methods in com.fasterxml.jackson.core.util with parameters of type JsonGeneratorModifier and TypeMethodDescriptionvoid
DefaultPrettyPrinter.beforeArrayValues
(JsonGenerator g) void
MinimalPrettyPrinter.beforeArrayValues
(JsonGenerator g) void
DefaultPrettyPrinter.beforeObjectEntries
(JsonGenerator g) void
MinimalPrettyPrinter.beforeObjectEntries
(JsonGenerator g) JsonGeneratorDecorator.decorate
(JsonFactory factory, JsonGenerator generator) Allow to decorateJsonGenerator
instances returned byJsonFactory
.void
DefaultPrettyPrinter.writeArrayValueSeparator
(JsonGenerator g) Method called after an array value has been completely output, and before another value is to be output.void
MinimalPrettyPrinter.writeArrayValueSeparator
(JsonGenerator g) Method called after an array value has been completely output, and before another value is to be output.void
DefaultPrettyPrinter.writeEndArray
(JsonGenerator g, int nrOfValues) void
MinimalPrettyPrinter.writeEndArray
(JsonGenerator g, int nrOfValues) void
DefaultPrettyPrinter.writeEndObject
(JsonGenerator g, int nrOfEntries) void
MinimalPrettyPrinter.writeEndObject
(JsonGenerator g, int nrOfEntries) void
DefaultIndenter.writeIndentation
(JsonGenerator jg, int level) void
DefaultPrettyPrinter.FixedSpaceIndenter.writeIndentation
(JsonGenerator g, int level) void
DefaultPrettyPrinter.Indenter.writeIndentation
(JsonGenerator g, int level) void
DefaultPrettyPrinter.NopIndenter.writeIndentation
(JsonGenerator g, int level) void
DefaultPrettyPrinter.writeObjectEntrySeparator
(JsonGenerator g) Method called after an object entry (field:value) has been completely output, and before another value is to be output.void
MinimalPrettyPrinter.writeObjectEntrySeparator
(JsonGenerator g) Method called after an object entry (field:value) has been completely output, and before another value is to be output.void
DefaultPrettyPrinter.writeObjectFieldValueSeparator
(JsonGenerator g) Method called after an object field has been output, but before the value is output.void
MinimalPrettyPrinter.writeObjectFieldValueSeparator
(JsonGenerator g) Method called after an object field has been output, but before the value is output.void
DefaultPrettyPrinter.writeRootValueSeparator
(JsonGenerator g) void
MinimalPrettyPrinter.writeRootValueSeparator
(JsonGenerator g) void
DefaultPrettyPrinter.writeStartArray
(JsonGenerator g) void
MinimalPrettyPrinter.writeStartArray
(JsonGenerator g) void
DefaultPrettyPrinter.writeStartObject
(JsonGenerator g) void
MinimalPrettyPrinter.writeStartObject
(JsonGenerator g) Constructors in com.fasterxml.jackson.core.util with parameters of type JsonGeneratorModifierConstructorDescriptionJsonGeneratorDelegate
(JsonGenerator d, boolean delegateCopyMethods)
JsonFactory.createGenerator(OutputStream)
instead.