com.fasterxml.jackson.core

## Class JsonFactoryBuilder

- java.lang.Object
- - com.fasterxml.jackson.core.TSFBuilder<JsonFactory,JsonFactoryBuilder>
  - - com.fasterxml.jackson.core.JsonFactoryBuilder

    public class JsonFactoryBuilder
    extends TSFBuilder<JsonFactory,JsonFactoryBuilder>

`TSFBuilder` implementation for constructing vanilla `JsonFactory` instances for reading/writing JSON encoded content.

Since:
  2.10

### Field Summary

Fields
`protected CharacterEscapes` `_characterEscapes`
`protected int` `_maximumNonEscapedChar`
`protected SerializableString` `_rootValueSeparator`

### Fields inherited from class com.fasterxml.jackson.core.TSFBuilder

`_factoryFeatures, _inputDecorator, _outputDecorator, _streamReadFeatures, _streamWriteFeatures, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS`

### Constructor Summary

Constructors
Constructor and Description
`JsonFactoryBuilder()`
`JsonFactoryBuilder(JsonFactory base)`

### Method Summary

All Methods Instance Methods Concrete Methods
`JsonFactory` `build()` Method for constructing actual `TokenStreamFactory` instance, given configuration.
`CharacterEscapes` `characterEscapes()`
`JsonFactoryBuilder` `characterEscapes(CharacterEscapes esc)` Method for defining custom escapes factory uses for `JsonGenerator`s it creates.
`JsonFactoryBuilder` `configure(JsonReadFeature f, boolean state)`
`JsonFactoryBuilder` `configure(JsonWriteFeature f, boolean state)`
`JsonFactoryBuilder` `disable(JsonReadFeature f)`
`JsonFactoryBuilder` `disable(JsonReadFeature first, JsonReadFeature... other)`
`JsonFactoryBuilder` `disable(JsonWriteFeature f)`
`JsonFactoryBuilder` `disable(JsonWriteFeature first, JsonWriteFeature... other)`
`JsonFactoryBuilder` `enable(JsonReadFeature f)`
`JsonFactoryBuilder` `enable(JsonReadFeature first, JsonReadFeature... other)`
`JsonFactoryBuilder` `enable(JsonWriteFeature f)`
`JsonFactoryBuilder` `enable(JsonWriteFeature first, JsonWriteFeature... other)`
`int` `highestNonEscapedChar()`
`JsonFactoryBuilder` `highestNonEscapedChar(int maxNonEscaped)` Method that allows specifying threshold beyond which all characters are automatically escaped (without checking possible custom escaping settings a la `characterEscapes(com.fasterxml.jackson.core.io.CharacterEscapes)`: for example, to force escaping of all non-ASCII characters (set to 127), or all non-Latin-1 character (set to 255).
`SerializableString` `rootValueSeparator()`
`JsonFactoryBuilder` `rootValueSeparator(SerializableString sep)` Method that allows overriding String used for separating root-level JSON values (default is single space character)
`JsonFactoryBuilder` `rootValueSeparator(String sep)` Method that allows overriding String used for separating root-level JSON values (default is single space character)

### Methods inherited from class com.fasterxml.jackson.core.TSFBuilder

`_legacyDisable, _legacyDisable, _legacyEnable, _legacyEnable, _this, configure, configure, configure, disable, disable, disable, disable, disable, enable, enable, enable, enable, enable, factoryFeaturesMask, inputDecorator, inputDecorator, outputDecorator, outputDecorator, streamReadFeatures, streamWriteFeatures`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### _characterEscapes

    protected CharacterEscapes _characterEscapes

#### _rootValueSeparator

    protected SerializableString _rootValueSeparator

#### _maximumNonEscapedChar

    protected int _maximumNonEscapedChar

### Constructor Detail

#### JsonFactoryBuilder

    public JsonFactoryBuilder()

#### JsonFactoryBuilder

    public JsonFactoryBuilder(JsonFactory base)

### Method Detail

#### enable

    public JsonFactoryBuilder enable(JsonReadFeature f)

Overrides:
  `enable` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### enable

    public JsonFactoryBuilder enable(JsonReadFeature first,
                                     JsonReadFeature... other)

Overrides:
  `enable` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### disable

    public JsonFactoryBuilder disable(JsonReadFeature f)

Overrides:
  `disable` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### disable

    public JsonFactoryBuilder disable(JsonReadFeature first,
                                      JsonReadFeature... other)

Overrides:
  `disable` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### configure

    public JsonFactoryBuilder configure(JsonReadFeature f,
                                        boolean state)

Overrides:
  `configure` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### enable

    public JsonFactoryBuilder enable(JsonWriteFeature f)

Overrides:
  `enable` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### enable

    public JsonFactoryBuilder enable(JsonWriteFeature first,
                                     JsonWriteFeature... other)

Overrides:
  `enable` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### disable

    public JsonFactoryBuilder disable(JsonWriteFeature f)

Overrides:
  `disable` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### disable

    public JsonFactoryBuilder disable(JsonWriteFeature first,
                                      JsonWriteFeature... other)

Overrides:
  `disable` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### configure

    public JsonFactoryBuilder configure(JsonWriteFeature f,
                                        boolean state)

Overrides:
  `configure` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`

#### characterEscapes

    public JsonFactoryBuilder characterEscapes(CharacterEscapes esc)

Method for defining custom escapes factory uses for `JsonGenerator`s it creates.

#### rootValueSeparator

    public JsonFactoryBuilder rootValueSeparator(String sep)

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

Parameters:
  `sep` - Separator to use, if any; null means that no separator is automatically added

#### rootValueSeparator

    public JsonFactoryBuilder rootValueSeparator(SerializableString sep)

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

Parameters:
  `sep` - Separator to use, if any; null means that no separator is automatically added

#### highestNonEscapedChar

    public JsonFactoryBuilder highestNonEscapedChar(int maxNonEscaped)

Method that allows specifying threshold beyond which all characters are automatically escaped (without checking possible custom escaping settings a la `characterEscapes(com.fasterxml.jackson.core.io.CharacterEscapes)`: for example, to force escaping of all non-ASCII characters (set to 127), or all non-Latin-1 character (set to 255). Default setting is "disabled", specified by passing value of `0` (or negative numbers).

NOTE! Lowest value (aside from marker 0) is 127: for ASCII range, other checks apply and this threshold is ignored.

Parameters:
  `maxNonEscaped` - Highest character code that is NOT automatically escaped; if positive value above 0, or 0 to indicate that no automatic escaping is applied beside from what JSON specification requires (and possible custom escape settings). Values between 1 and 127 are all taken to behave as if 127 is specified: that is, no automatic escaping is applied in ASCII range.

#### characterEscapes

    public CharacterEscapes characterEscapes()

#### rootValueSeparator

    public SerializableString rootValueSeparator()

#### highestNonEscapedChar

    public int highestNonEscapedChar()

#### build

    public JsonFactory build()

Description copied from class: `TSFBuilder`
Method for constructing actual `TokenStreamFactory` instance, given configuration.

Specified by:
  `build` in class `TSFBuilder<JsonFactory,JsonFactoryBuilder>`