Class MappingJsonFactory
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.TokenStreamFactory
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonFactory
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.MappingJsonFactory
- All Implemented Interfaces:
Versioned
,Serializable
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.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonFactory
JsonFactory.Feature
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonFactory
_byteSymbolCanonicalizer, _characterEscapes, _factoryFeatures, _generatorFeatures, _inputDecorator, _maximumNonEscapedChar, _objectCodec, _outputDecorator, _parserFeatures, _quoteChar, _rootCharSymbols, _rootValueSeparator, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS, DEFAULT_QUOTE_CHAR, DEFAULT_ROOT_VALUE_SEPARATOR, FORMAT_NAME_JSON
-
Constructor Summary
ConstructorDescriptionMappingJsonFactory
(JsonFactory src, ObjectMapper mapper) MappingJsonFactory
(ObjectMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Method for constructing a newJsonFactory
that has the same settings as this instance, but is otherwise independent (i.e.final ObjectMapper
getCodec()
We'll override the method to return more specific type; co-variance helps hereSub-classes need to override this methodhasFormat
(InputAccessor acc) Sub-classes need to override this methodMethods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonFactory
_checkInvalidCopy, _createContentReference, _createContentReference, _createContext, _createContext, _createGenerator, _createNonBlockingContext, _createParser, _createParser, _createParser, _createParser, _createParser, _createUTF8Generator, _createWriter, _decorate, _decorate, _decorate, _decorate, _decorate, _getBufferRecycler, builder, canHandleBinaryNatively, canParseAsync, canUseCharArrays, canUseSchema, configure, configure, configure, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createJsonGenerator, createJsonGenerator, createJsonGenerator, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createNonBlockingByteArrayParser, createNonBlockingByteBufferParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, disable, disable, disable, enable, enable, enable, getCharacterEscapes, getFormatGeneratorFeatures, getFormatParserFeatures, getFormatReadFeatureType, getFormatWriteFeatureType, getGeneratorFeatures, getInputDecorator, getOutputDecorator, getParserFeatures, getRootValueSeparator, hasJSONFormat, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, readResolve, rebuild, requiresCustomCodec, requiresPropertyOrdering, setCharacterEscapes, setCodec, setInputDecorator, setOutputDecorator, setRootValueSeparator, version
Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.TokenStreamFactory
_checkRangeBoundsForByteArray, _checkRangeBoundsForCharArray, _createDataOutputWrapper, _fileInputStream, _fileOutputStream, _optimizedStreamFromURL, _reportRangeError
-
Constructor Details
-
MappingJsonFactory
public MappingJsonFactory() -
MappingJsonFactory
-
MappingJsonFactory
-
-
Method Details
-
getCodec
We'll override the method to return more specific type; co-variance helps here- Overrides:
getCodec
in classJsonFactory
-
copy
Description copied from class:JsonFactory
Method for constructing a newJsonFactory
that has the same settings as this instance, but is otherwise independent (i.e. nothing is actually shared, symbol tables are separate). Note thatObjectCodec
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.- Overrides:
copy
in classJsonFactory
- Returns:
- Copy of this factory instance
-
getFormatName
Sub-classes need to override this method- Overrides:
getFormatName
in classJsonFactory
- Returns:
- Name of the format handled by parsers, generators this factory creates
-
hasFormat
Sub-classes need to override this method- Overrides:
hasFormat
in classJsonFactory
- Throws:
IOException
-