Top Description Fields Constructors Methods
com.fasterxml.jackson.databind

public Class MappingJsonFactory

extends JsonFactory
Class Inheritance
Imports
java.io.IOException, com.fasterxml.jackson.core.*, com.fasterxml.jackson.core.format.InputAccessor, .MatchStrength

Sub-class of JsonFactory that will create a proper ObjectCodec to allow seam-less conversions between JSON content and Java objects (POJOs). The only addition to regular JsonFactory currently is that ObjectMapper is constructed and passed as the codec to use.

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.core.JsonFactory:
_byteSymbolCanonicalizer_characterEscapes_errorReportConfiguration_factoryFeatures_generatorDecorators_generatorFeatures_inputDecorator_maximumNonEscapedChar_objectCodec_outputDecorator_parserFeatures_quoteChar_recyclerPool_rootCharSymbols_rootValueSeparator_streamReadConstraints_streamWriteConstraintsDEFAULT_FACTORY_FEATURE_FLAGSDEFAULT_GENERATOR_FEATURE_FLAGSDEFAULT_PARSER_FEATURE_FLAGSDEFAULT_QUOTE_CHARDEFAULT_ROOT_VALUE_SEPARATORFORMAT_NAME_JSON

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public JsonFactory
copy()

Overrides com.fasterxml.jackson.core.JsonFactory.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 final ObjectMapper
getCodec()

Overrides com.fasterxml.jackson.core.JsonFactory.getCodec.

We'll override the method to return more specific type; co-variance helps here
public String
getFormatName()

Overrides com.fasterxml.jackson.core.JsonFactory.getFormatName.

Sub-classes need to override this method
public MatchStrength
hasFormat(InputAccessor acc)

Overrides com.fasterxml.jackson.core.JsonFactory.hasFormat.

Sub-classes need to override this method
Inherited from com.fasterxml.jackson.core.JsonFactory:
_checkInvalidCopy_copy_createContentReference_createContentReference_createContext_createContext_createGenerator_createNonBlockingContext_createParser_createParser_createParser_createParser_createParser_createUTF8Generator_createWriter_decorate_decorate_decorate_decorate_decorate_decorate_getBufferRecycler_getRecyclerPoolbuildercanHandleBinaryNativelycanParseAsynccanUseCharArrayscanUseSchemaconfigureconfigureconfigurecreateGeneratorcreateGeneratorcreateGeneratorcreateGeneratorcreateGeneratorcreateGeneratorcreateJsonGeneratorcreateJsonGeneratorcreateJsonGeneratorcreateJsonParsercreateJsonParsercreateJsonParsercreateJsonParsercreateJsonParsercreateJsonParsercreateJsonParsercreateNonBlockingByteArrayParsercreateNonBlockingByteBufferParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParsercreateParserdisabledisabledisableenableenableenablegetCharacterEscapesgetFactoryFeaturesgetFormatGeneratorFeaturesgetFormatParserFeaturesgetFormatReadFeatureTypegetFormatWriteFeatureTypegetGeneratorFeaturesgetInputDecoratorgetOutputDecoratorgetParserFeaturesgetRootValueSeparatorhasJSONFormatisEnabledisEnabledisEnabledisEnabledisEnabledreadResolverebuildrequiresCustomCodecrequiresPropertyOrderingsetCharacterEscapessetCodecsetErrorReportConfigurationsetInputDecoratorsetOutputDecoratorsetRecyclerPoolsetRootValueSeparatorsetStreamReadConstraintssetStreamWriteConstraintsstreamReadConstraintsstreamWriteConstraintsversion

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.core.JsonFactory.serialVersionUID.

Constructor Detail

MappingJsonFactoryback to summary
public MappingJsonFactory()
MappingJsonFactoryback to summary
public MappingJsonFactory(ObjectMapper mapper)
MappingJsonFactoryback to summary
public MappingJsonFactory(JsonFactory src, ObjectMapper mapper)

Method Detail

copyback to summary
public JsonFactory copy()

Overrides com.fasterxml.jackson.core.JsonFactory.copy.

Doc from com.fasterxml.jackson.core.JsonFactory.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). Note that ObjectCodec reference is not copied but is set to null; caller typically needs to set it after calling this method. Reason for this is that the codec is used for callbacks, and assumption is that there is strict 1-to-1 mapping between codec, factory. Caller has to, then, explicitly set codec after making the copy.

Returns:JsonFactory

Copy of this factory instance

Annotations
@Override
getCodecback to summary
public final ObjectMapper getCodec()

Overrides com.fasterxml.jackson.core.JsonFactory.getCodec.

We'll override the method to return more specific type; co-variance helps here

Annotations
@Override
getFormatNameback to summary
public String getFormatName()

Overrides com.fasterxml.jackson.core.JsonFactory.getFormatName.

Sub-classes need to override this method

Returns:String

Doc from com.fasterxml.jackson.core.JsonFactory.getFormatName.

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

Annotations
@Override
hasFormatback to summary
public MatchStrength hasFormat(InputAccessor acc) throws IOException

Overrides com.fasterxml.jackson.core.JsonFactory.hasFormat.

Sub-classes need to override this method

Annotations
@Override