Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.core

public Class JsonFactory

extends TokenStreamFactory
implements Versioned, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, com.fasterxml.jackson.core.Versioned
Annotations
@SuppressWarnings:resource
Imports
java.io.*, java.lang.ref.SoftReference, java.net.URL, java.util.ArrayList, .List, .Objects, com.fasterxml.jackson.core.format.InputAccessor, .MatchStrength, com.fasterxml.jackson.core.io.*, com.fasterxml.jackson.core.json.*, com.fasterxml.jackson.core.json.async.NonBlockingByteBufferJsonParser, .NonBlockingJsonParser, com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer, .CharsToNameCanonicalizer, com.fasterxml.jackson.core.util.*

The main factory class of Jackson package, used to configure and construct reader (aka parser, JsonParser) and writer (aka generator, JsonGenerator) instances.

Factory instances are thread-safe and reusable after configuration (if any). Typically applications and services use only a single globally shared factory instance, unless they need differently configured factories. Factory reuse is important if efficiency matters; most recycling of expensive construct is done on per-factory basis.

Creation of a factory instance is a light-weight operation, and since there is no need for pluggable alternative implementations (as there is no "standard" JSON processor API to implement), the default constructor is used for constructing factory instances.

Author
Tatu Saloranta

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
JsonFactory.Feature

Enumeration that defines all on/off features that can only be changed for JsonFactory.

Field Summary

Modifier and TypeField and Description
protected final transient ByteQuadsCanonicalizer
_byteSymbolCanonicalizer

Alternative to the basic symbol table, some stream-based parsers use different name canonicalization method.

protected CharacterEscapes
_characterEscapes

Definition of custom character escapes to use for generators created by this factory, if any.

protected ErrorReportConfiguration
_errorReportConfiguration

Container for configuration values used when handling erroneous token inputs.

protected int
_factoryFeatures

Currently enabled factory features.

protected final List<JsonGeneratorDecorator>
_generatorDecorators

List of JsonGeneratorDecorators to apply to JsonGenerators after construction; applied in the order of addition.

protected int
_generatorFeatures

Currently enabled generator features.

protected InputDecorator
_inputDecorator

Optional helper object that may decorate input sources, to do additional processing on input during parsing.

protected int
_maximumNonEscapedChar

Optional threshold used for automatically escaping character above certain character code value: either 0 to indicate that no threshold is specified, or value at or above 127 to indicate last character code that is NOT automatically escaped (but depends on other configuration rules for checking).

protected ObjectCodec
_objectCodec

Object that implements conversion functionality between Java objects and JSON content.

protected OutputDecorator
_outputDecorator

Optional helper object that may decorate output object, to do additional processing on output during content generation.

protected int
_parserFeatures

Currently enabled parser features.

protected final char
_quoteChar

Character used for quoting field names (if field name quoting has not been disabled with JsonWriteFeature#QUOTE_FIELD_NAMES) and JSON String values.

protected RecyclerPool<BufferRecycler>
protected final transient CharsToNameCanonicalizer
_rootCharSymbols

Each factory comes equipped with a shared root symbol table.

protected SerializableString
_rootValueSeparator

Separator used between root-level values, if any; null indicates "do not add separator".

protected StreamReadConstraints
_streamReadConstraints

Read constraints to use for JsonParsers constructed using this factory.

protected StreamWriteConstraints
_streamWriteConstraints

Write constraints to use for JsonGenerators constructed using this factory.

protected static final int
DEFAULT_FACTORY_FEATURE_FLAGS

Bitfield (set of flags) of all factory features that are enabled by default.

protected static final int
DEFAULT_GENERATOR_FEATURE_FLAGS

Bitfield (set of flags) of all generator features that are enabled by default.

protected static final int
DEFAULT_PARSER_FEATURE_FLAGS

Bitfield (set of flags) of all parser features that are enabled by default.

public static final char
public static final SerializableString
public static final String
FORMAT_NAME_JSON

Name used to identify JSON format (and returned by getFormatName()

private static final long

Constructor Summary

AccessConstructor and Description
public
JsonFactory()

Default constructor used to create factory instances.

public
protected
JsonFactory(JsonFactory
Original factory to copy settings from
src
,
ObjectCodec
Databinding-level codec to use, if any
codec
)

Constructor used when copy()ing a factory instance.

public
JsonFactory(JsonFactoryBuilder
Builder that contains settings to use
b
)

Constructor used by JsonFactoryBuilder for instantiation.

protected
JsonFactory(TSFBuilder<?, ?>
Builder that contains settings to use
b
,
boolean
Argument only needed to separate constructor signature; ignored
bogus
)

Constructor for subtypes; needed to work around the fact that before 3.0, this factory has cumbersome dual role as generic type as well as actual implementation for json.

Method Summary

Modifier and TypeMethod and Description
protected void
protected static <T> List<T>
_copy(List<T> src)

protected ContentReference

Returns:

Reference instance to use
_createContentReference
(Object
Access to underlying content; depends on source/target, as well as content representation
contentAccessor
)

Overridable factory method for constructing ContentReference to pass to parser or generator being created; used in cases where no offset or length is applicable (either irrelevant, or full contents assumed).

protected ContentReference

Returns:

Reference instance to use
_createContentReference
(Object
Access to underlying content; depends on source/target, as well as content representation
contentAccessor
,
int
Offset of content
offset
,
int
Length of content
length
)

Overridable factory method for constructing ContentReference to pass to parser or generator being created; used in cases where content is available in a static buffer with relevant offset and length (mostly when reading from byte[], char[] or String).

protected IOContext

Returns:

I/O context created
_createContext
(ContentReference
Source/target reference to use for diagnostics, exception messages
contentRef
,
boolean
Whether input/output buffer is managed by this factory or not
resourceManaged
)

Overridable factory method that actually instantiates desired context object.

protected IOContext

Returns:

I/O context created
_createContext
(Object
"Raw" source/target reference
rawContentRef
,
boolean
Whether input/output buffer is managed by this factory or not
resourceManaged
)

Deprecated Since 2.13
Deprecated variant of _createContext(Object, boolean)
protected JsonGenerator

Returns:

This factory instance (to allow call chaining)
_createGenerator
(Writer
Writer underlying writer to write generated content to
out
,
IOContext
I/O context to use
ctxt
)

Overridable factory method that actually instantiates generator for given Writer and context object.

protected IOContext

Returns:

I/O context created
_createNonBlockingContext
(Object
Source reference to use for diagnostics, exception messages
srcRef
)

Overridable factory method that actually instantiates desired context object for async (non-blocking) parsing

protected JsonParser

Returns:

Parser constructed
_createParser
(InputStream
InputStream to use for reading content to parse
in
,
IOContext
I/O context to use for parsing
ctxt
)

Overridable factory method that actually instantiates desired parser given InputStream and context object.

protected JsonParser

Returns:

Actual parser to use
_createParser
(Reader
Reader to use for reading content to parse
r
,
IOContext
I/O context to use for parsing
ctxt
)

Overridable factory method that actually instantiates parser using given Reader object for reading content.

protected JsonParser

Returns:

Actual parser to use
_createParser
(char[]
Buffer that contains content to parse
data
,
int
Offset to the first character of data to parse
offset
,
int
Number of characters within buffer to parse
len
,
IOContext
I/O context to use for parsing
ctxt
,
boolean
Whether input buffer is recycled by the factory
recyclable
)

Overridable factory method that actually instantiates parser using given char[] object for accessing content.

protected JsonParser

Returns:

Actual parser to use
_createParser
(byte[]
Buffer that contains content to parse
data
,
int
Offset to the first character of data to parse
offset
,
int
Number of characters within buffer to parse
len
,
IOContext
I/O context to use for parsing
ctxt
)

Overridable factory method that actually instantiates parser using given Reader object for reading content passed as raw byte array.

protected JsonParser

Returns:

Actual parser to use
_createParser
(DataInput
DataInput to use for reading content to parse
input
,
IOContext
I/O context to use for parsing
ctxt
)

Optional factory method, expected to be overridden

protected JsonGenerator

Returns:

This factory instance (to allow call chaining)
_createUTF8Generator
(OutputStream
OutputStream underlying writer to write generated content to
out
,
IOContext
I/O context to use
ctxt
)

Overridable factory method that actually instantiates generator for given OutputStream and context object, using UTF-8 encoding.

protected Writer
protected final InputStream
protected final Reader
protected final DataInput
protected final OutputStream
protected final Writer
protected JsonGenerator

Returns:

Generator after applying all registered JsonGeneratorDecorators.
_decorate
(JsonGenerator
Generator constructed that is to be decorated
g
)

Helper method for applying all registered JsonGeneratorDecorators on freshly constructed JsonGenerator.

public BufferRecycler

Returns:

Buffer recycler instance to use
_getBufferRecycler
()

Method used by factory to create buffer recycler instances for parsers and generators.

public RecyclerPool<BufferRecycler>

Returns:

RecyclerPool to use.
_getRecyclerPool
()

Accessor for getting access to RecyclerPool for getting BufferRecycler instance to use.

private final boolean
private final void
_requireJSONFactory(String
Message template to use for reporting problem (if necessary)
msg
)

Helper method called to work around the problem of this class both defining general API for constructing parsers+generators AND implementing the API for JSON handling.

public static TSFBuilder<?, ?>

Returns:

Builder instance to use
builder
()

Main factory method to use for constructing JsonFactory instances with different configuration: creates and returns a builder for collecting configuration settings; instance created by calling build() after all configuration set.

public boolean

Returns:

Whether format supported by this factory supports native binary content
canHandleBinaryNatively
()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.canHandleBinaryNatively.

Introspection method that higher-level functionality may call to see whether underlying data format can read and write binary data natively; that is, embeded it as-is without using encodings such as Base64.
public boolean

Returns:

Whether this factory supports non-blocking ("async") parsing or not (and consequently whether createNonBlockingXxx() method(s) work)
canParseAsync
()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.canParseAsync.

Introspection method that can be used to check whether this factory can create non-blocking parsers: parsers that do not use blocking I/O abstractions but instead use a com.fasterxml.jackson.core.async.NonBlockingInputFeeder.
public boolean

Returns:

Whether access to decoded textual content can be efficiently accessed using parser method getTextCharacters().
canUseCharArrays
()

Introspection method that can be used by base factory to check whether access using char[] is something that actual parser implementations can take advantage of, over having to use java.io.Reader.

public boolean

Returns:

Whether parsers and generators constructed by this factory can use specified format schema instance
canUseSchema
(FormatSchema
Schema instance to check
schema
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.canUseSchema.

Method that can be used to quickly check whether given schema is something that parsers and/or generators constructed by this factory could use.
public final JsonFactory

Returns:

This factory instance (to allow call chaining)
configure
(JsonFactory.Feature
Feature to enable/disable
f
,
boolean
Whether to enable or disable the feature
state
)

Method for enabling or disabling specified parser feature (check JsonParser.Feature for list of features)
public final JsonFactory

Returns:

This factory instance (to allow call chaining)
configure
(JsonParser.Feature
Feature to enable/disable
f
,
boolean
Whether to enable or disable the feature
state
)

Method for enabling or disabling specified parser feature (check JsonParser.Feature for list of features)

public final JsonFactory

Returns:

This factory instance (to allow call chaining)
configure
(JsonGenerator.Feature
Feature to enable/disable
f
,
boolean
Whether to enable or disable the feature
state
)

Method for enabling or disabling specified generator feature (check JsonGenerator.Feature for list of features)

public JsonFactory

Returns:

Copy of this factory instance
copy
()

Method for constructing a new JsonFactory that has the same settings as this instance, but is otherwise independent (i.e. nothing is actually shared, symbol tables are separate).

public JsonGenerator
createGenerator(OutputStream
OutputStream to use for writing JSON content
out
,
JsonEncoding
Character encoding to use
enc
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createGenerator.

Method for constructing JSON generator for writing JSON content using specified output stream.
public JsonGenerator
createGenerator(OutputStream out)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createGenerator.

Convenience method for constructing generator that uses default encoding of the format (UTF-8 for JSON and most other data formats).
public JsonGenerator
createGenerator(Writer
Writer to use for writing JSON content
w
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createGenerator.

Method for constructing JSON generator for writing JSON content using specified Writer.
public JsonGenerator
createGenerator(File
File to write contents to
f
,
JsonEncoding
Character encoding to use
enc
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createGenerator.

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).
public JsonGenerator
createGenerator(DataOutput out, JsonEncoding enc)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createGenerator.

Method for constructing generator for writing content using specified DataOutput instance.
public JsonGenerator
createGenerator(DataOutput out)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createGenerator.

Convenience method for constructing generator that uses default encoding of the format (UTF-8 for JSON and most other data formats).
public JsonGenerator

Returns:

Generator constructed
createJsonGenerator
(OutputStream
OutputStream to use for writing JSON content
out
,
JsonEncoding
Character encoding to use
enc
)

Deprecated Since 2.2, use createGenerator(OutputStream, JsonEncoding) instead.
Method for constructing JSON generator for writing JSON content using specified output stream.
public JsonGenerator

Returns:

Generator constructed
createJsonGenerator
(Writer
Writer to use for writing JSON content
out
)

Deprecated Since 2.2, use createGenerator(Writer) instead.
Method for constructing JSON generator for writing JSON content using specified Writer.
public JsonGenerator

Returns:

Generator constructed
createJsonGenerator
(OutputStream
OutputStream to use for writing JSON content
out
)

Deprecated Since 2.2, use createGenerator(OutputStream) instead.
Convenience method for constructing generator that uses default encoding of the format (UTF-8 for JSON and most other data formats).
public JsonParser

Returns:

Parser constructed
createJsonParser
(File
File that contains JSON content to parse
f
)

Deprecated Since 2.2, use createParser(File) instead.
Method for constructing JSON parser instance to parse contents of specified file.
public JsonParser

Returns:

Parser constructed
createJsonParser
(URL
URL pointing to resource that contains JSON content to parse
url
)

Deprecated Since 2.2, use createParser(URL) instead.
Method for constructing JSON parser instance to parse contents of resource reference by given URL.
public JsonParser

Returns:

Parser constructed
createJsonParser
(InputStream
InputStream to use for reading JSON content to parse
in
)

Deprecated Since 2.2, use createParser(InputStream) instead.
Method for constructing JSON parser instance to parse the contents accessed via specified input stream.
public JsonParser

Returns:

Parser constructed
createJsonParser
(Reader
Reader to use for reading JSON content to parse
r
)

Deprecated Since 2.2, use createParser(Reader) instead.
Method for constructing parser for parsing the contents accessed via specified Reader.
public JsonParser

Returns:

Parser constructed
createJsonParser
(byte[]
Input content to parse
data
)

Deprecated Since 2.2, use createParser(byte[]) instead.
Method for constructing parser for parsing the contents of given byte array.
public JsonParser

Returns:

Parser constructed
createJsonParser
(byte[]
Buffer that contains data to parse
data
,
int
Offset of the first data byte within buffer
offset
,
int
Length of contents to parse within buffer
len
)

Deprecated Since 2.2, use createParser(byte[], int, int) instead.
Method for constructing parser for parsing the contents of given byte array.
public JsonParser

Returns:

Parser constructed
createJsonParser
(String
Input content to parse
content
)

Deprecated Since 2.2, use createParser(String) instead.
Method for constructing parser for parsing contents of given String.
public JsonParser
createNonBlockingByteArrayParser()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createNonBlockingByteArrayParser.

Optional method for constructing parser for non-blocking parsing via com.fasterxml.jackson.core.async.ByteArrayFeeder interface (accessed using JsonParser#getNonBlockingInputFeeder() from constructed instance).
public JsonParser
createNonBlockingByteBufferParser()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createNonBlockingByteBufferParser.

Optional method for constructing parser for non-blocking parsing via com.fasterxml.jackson.core.async.ByteBufferFeeder interface (accessed using JsonParser#getNonBlockingInputFeeder() from constructed instance).
public JsonParser
createParser(File
File that contains JSON content to parse
f
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing JSON parser instance to parse contents of specified file.
public JsonParser
createParser(URL
URL pointing to resource that contains JSON content to parse
url
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing JSON parser instance to parse contents of resource reference by given URL.
public JsonParser
createParser(InputStream
InputStream to use for reading JSON content to parse
in
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing JSON parser instance to parse the contents accessed via specified input stream.
public JsonParser
createParser(Reader
Reader to use for reading JSON content to parse
r
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing parser for parsing the contents accessed via specified Reader.
public JsonParser
createParser(byte[] data)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing parser for parsing the contents of given byte array.
public JsonParser
createParser(byte[]
Buffer that contains data to parse
data
,
int
Offset of the first data byte within buffer
offset
,
int
Length of contents to parse within buffer
len
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing parser for parsing the contents of given byte array.
public JsonParser
createParser(String content)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing parser for parsing contents of given String.
public JsonParser
createParser(char[] content)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing parser for parsing contents of given char array.
public JsonParser
createParser(char[] content, int offset, int len)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Method for constructing parser for parsing contents of given char array.
public JsonParser
createParser(DataInput in)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.createParser.

Optional method for constructing parser for reading contents from specified DataInput instance.
public JsonFactory

Returns:

This factory instance (to allow call chaining)
disable
(JsonFactory.Feature
Feature to disable
f
)

Method for disabling specified parser features (check JsonFactory.Feature for list of features)
public JsonFactory

Returns:

This factory instance (to allow call chaining)
disable
(JsonParser.Feature
Feature to disable
f
)

Method for disabling specified parser features (check JsonParser.Feature for list of features)

public JsonFactory

Returns:

This factory instance (to allow call chaining)
disable
(JsonGenerator.Feature
Feature to disable
f
)

Method for disabling specified generator feature (check JsonGenerator.Feature for list of features)

public JsonFactory

Returns:

This factory instance (to allow call chaining)
enable
(JsonFactory.Feature
Feature to enable
f
)

Method for enabling specified parser feature (check JsonFactory.Feature for list of features)
public JsonFactory

Returns:

This factory instance (to allow call chaining)
enable
(JsonParser.Feature
Feature to enable
f
)

Method for enabling specified parser feature (check JsonParser.Feature for list of features)

public JsonFactory

Returns:

This factory instance (to allow call chaining)
enable
(JsonGenerator.Feature
Feature to enable
f
)

Method for enabling specified generator features (check JsonGenerator.Feature for list of features)

public CharacterEscapes

Returns:

Configured CharacterEscapes, if any; null if none
getCharacterEscapes
()

Method for accessing custom escapes factory uses for JsonGenerators it creates.

public ObjectCodec
public final int
getFactoryFeatures()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.getFactoryFeatures.

Method for getting bit set of all JsonFactory.Features enabled
public int
public String

Returns:

Name of the format handled by parsers, generators this factory creates
getFormatName
()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.getFormatName.

Method that returns short textual id identifying format this factory supports.
public int
public Class<? extends FormatFeature>
getFormatReadFeatureType()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.getFormatReadFeatureType.

Method for accessing kind of FormatFeature that a parser JsonParser produced by this factory would accept, if any; null returned if none.
public Class<? extends FormatFeature>
getFormatWriteFeatureType()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.getFormatWriteFeatureType.

Method for accessing kind of FormatFeature that a parser JsonGenerator produced by this factory would accept, if any; null returned if none.
public final int
public InputDecorator

Returns:

InputDecorator configured, if any
getInputDecorator
()

Method for getting currently configured input decorator (if any; there is no default decorator).

public OutputDecorator

Returns:

OutputDecorator configured for generators factory creates, if any; null if none.
getOutputDecorator
()

Method for getting currently configured output decorator (if any; there is no default decorator).

public final int
public String

Returns:

Root value separator configured, if any
getRootValueSeparator
()

public MatchStrength
protected MatchStrength
public final boolean

Returns:

True if the specified feature is enabled
isEnabled
(JsonFactory.Feature
Feature to check
f
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.isEnabled.

Checked whether specified parser feature is enabled.
public final boolean

Returns:

True if specified feature is enabled
isEnabled
(JsonParser.Feature
Feature to check
f
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.isEnabled.

Method for checking if the specified parser feature is enabled.
public final boolean

Returns:

True if specified feature is enabled
isEnabled
(StreamReadFeature
Feature to check
f
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.isEnabled.

Method for checking if the specified stream read feature is enabled.
public final boolean

Returns:

Whether specified feature is enabled
isEnabled
(JsonGenerator.Feature
Feature to check
f
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.isEnabled.

Check whether specified generator feature is enabled.
public final boolean

Returns:

Whether specified feature is enabled
isEnabled
(StreamWriteFeature
Feature to check
f
)

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.isEnabled.

Check whether specified stream write feature is enabled.
protected Object

Returns:

Newly constructed instance
readResolve
()

Method that we need to override to actually make restoration go through constructors etc: needed to allow JDK serializability of factory instances.

public TSFBuilder<?, ?>

Returns:

Builder instance to use
rebuild
()

Method that allows construction of differently configured factory, starting with settings of this factory.

public boolean

Returns:

True if custom codec is needed with parsers and generators created by this factory; false if a general ObjectCodec is enough
requiresCustomCodec
()

Method that can be called to determine if a custom ObjectCodec is needed for binding data parsed using JsonParser constructed by this factory (which typically also implies the same for serialization with JsonGenerator).

public boolean

Returns:

Whether format supported by this factory requires Object properties to be ordered.
requiresPropertyOrdering
()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.requiresPropertyOrdering.

Introspection method that higher-level functionality may call to see whether underlying data format requires a stable ordering of object properties or not.
public JsonFactory

Returns:

This factory instance (to allow call chaining)
setCharacterEscapes
(CharacterEscapes
CharaterEscapes to set (or null for "none")
esc
)

Method for defining custom escapes factory uses for JsonGenerators it creates.

public JsonFactory

Returns:

This factory instance (to allow call chaining)
setCodec
(ObjectCodec
Codec to use
oc
)

Method for associating a ObjectCodec (typically a com.fasterxml.jackson.databind.ObjectMapper) with this factory (and more importantly, parsers and generators it constructs).

public JsonFactory

Returns:

This factory instance (to allow call chaining)
setErrorReportConfiguration
(ErrorReportConfiguration
Configuration
src
)

Method for overriding ErrorReportConfiguration defined for this factory.

public JsonFactory

Returns:

This factory instance (to allow call chaining)
setInputDecorator
(InputDecorator
Decorator to configure for this factory, if any (null if none)
d
)

Deprecated Since 2.10 use JsonFactoryBuilder#inputDecorator(InputDecorator) instead
Method for overriding currently configured input decorator
public JsonFactory

Returns:

This factory instance (to allow call chaining)
setOutputDecorator
(OutputDecorator
Output decorator to use, if any
d
)

Deprecated Since 2.10 use JsonFactoryBuilder#outputDecorator(OutputDecorator) instead
Method for overriding currently configured output decorator
public JsonFactory
public JsonFactory

Returns:

This factory instance (to allow call chaining)
setRootValueSeparator
(String
Separator to use, if any; null means that no separator is automatically added
sep
)

Method that allows overriding String used for separating root-level JSON values (default is single space character)

public JsonFactory

Returns:

This factory instance (to allow call chaining)
setStreamReadConstraints
(StreamReadConstraints
Constraints
src
)

Method for overriding StreamReadConstraints defined for this factory.

public JsonFactory

Returns:

This factory instance (to allow call chaining)
setStreamWriteConstraints
(StreamWriteConstraints
Constraints
swc
)

Method for overriding StreamWriteConstraints defined for this factory.

public StreamReadConstraints
streamReadConstraints()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.streamReadConstraints.

Get the constraints to apply when performing streaming reads.
public StreamWriteConstraints
streamWriteConstraints()

Implements abstract com.fasterxml.jackson.core.TokenStreamFactory.streamWriteConstraints.

Get the constraints to apply when performing streaming writes.
public Version
version()

Implements com.fasterxml.jackson.core.Versioned.version.

Method called to detect version of the component that implements this interface; returned version should never be null, but may return specific "not available" instance (see Version for details).
Inherited from com.fasterxml.jackson.core.TokenStreamFactory:
_checkRangeBoundsForByteArray_checkRangeBoundsForCharArray_createDataOutputWrapper_fileInputStream_fileOutputStream_optimizedStreamFromURL_reportRangeError