public class MappingJsonFactory extends JsonFactory
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.JsonFactory.Feature
_characterEscapes, _factoryFeatures, _generatorFeatures, _inputDecorator, _objectCodec, _outputDecorator, _parserFeatures, _recyclerRef, _rootByteSymbols, _rootCharSymbols, _rootValueSeparator, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS, FORMAT_NAME_JSON
Constructor and Description |
---|
MappingJsonFactory() |
MappingJsonFactory(ObjectMapper mapper) |
Modifier and Type | Method and Description |
---|---|
JsonFactory |
copy() |
ObjectMapper |
getCodec()
We'll override the method to return more specific type; co-variance
helps here
|
String |
getFormatName()
Sub-classes need to override this method (as of 1.8)
|
MatchStrength |
hasFormat(InputAccessor acc)
Sub-classes need to override this method (as of 1.8)
|
_checkInvalidCopy, _createContext, _createGenerator, _createParser, _createParser, _createParser, _createParser, _createUTF8Generator, _createWriter, _decorate, _decorate, _decorate, _decorate, _getBufferRecycler, _optimizedStreamFromURL, canHandleBinaryNatively, canUseCharArrays, canUseSchema, configure, configure, configure, createGenerator, createGenerator, createGenerator, createGenerator, createJsonGenerator, createJsonGenerator, createJsonGenerator, createJsonGenerator, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, disable, disable, disable, enable, enable, enable, getCharacterEscapes, getInputDecorator, getOutputDecorator, getRootValueSeparator, hasJSONFormat, isEnabled, isEnabled, isEnabled, readResolve, requiresCustomCodec, requiresPropertyOrdering, setCharacterEscapes, setCodec, setInputDecorator, setOutputDecorator, setRootValueSeparator, version
public MappingJsonFactory()
public MappingJsonFactory(ObjectMapper mapper)
public final ObjectMapper getCodec()
getCodec
in class JsonFactory
public JsonFactory copy()
copy
in class JsonFactory
public String getFormatName()
getFormatName
in class JsonFactory
public MatchStrength hasFormat(InputAccessor acc) throws IOException
hasFormat
in class JsonFactory
IOException
Copyright © 2014 FasterXML. All Rights Reserved.