Class JsonMapper
java.lang.Object
tools.jackson.databind.ObjectMapper
tools.jackson.databind.json.JsonMapper
- All Implemented Interfaces:
Serializable, tools.jackson.core.TreeCodec<JsonNode>, tools.jackson.core.Versioned
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBase implementation for "Vanilla"ObjectMapper, used with JSON dataformat backend.private static final classHelper class to contain dynamically constructed "shared" instance of mapper, should one be needed viashared(). -
Field Summary
FieldsFields inherited from class ObjectMapper
_deserializationConfig, _deserializationContexts, _injectableValues, _rootDeserializers, _savedBuilderState, _serializationConfig, _serializationContexts, _streamFactory, _typeFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonMapper.Builderbuilder()static JsonMapper.Builderbuilder(tools.jackson.core.json.JsonFactory streamFactory) static JsonMapper.BuilderModifies the settings of this builder to more closely match the default configs used in Jackson 2.x versions.booleanisEnabled(tools.jackson.core.json.JsonReadFeature f) booleanisEnabled(tools.jackson.core.json.JsonWriteFeature f) rebuild()Method for creating a newMapperBuilderfor constructing differently configuredObjectMapperinstance, starting with current configuration including base settings and registered modules.static JsonMappershared()Accessor method for getting globally shared "default"JsonMapperinstance: one that has default configuration, no modules registered, no config overrides.tools.jackson.core.json.JsonFactoryMethod that can be used to get hold ofTokenStreamFactorythat this mapper uses if it needs to constructJsonParsers and/orJsonGenerators.tools.jackson.core.Versionversion()Method that will return version information stored in and read from jar that contains this class.Methods inherited from class ObjectMapper
_assertNotNull, _configAndWriteValue, _convert, _deserializationContext, _deserializationContext, _deserializationContext, _findRootDeserializer, _initForReading, _newReader, _newReader, _newWriter, _newWriter, _newWriter, _readMapAndClose, _readTreeAndClose, _readValue, _serializationContext, _serializationContext, _verifyNoTrailingTokens, _verifySchemaType, _writeCloseableValue, acceptJsonFormatVisitor, acceptJsonFormatVisitor, acceptJsonFormatVisitor, booleanNode, clearCaches, constructType, constructType, convertValue, convertValue, convertValue, createArrayNode, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createNonBlockingByteArrayParser, createNonBlockingByteBufferParser, createObjectNode, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, deserializationConfig, getInjectableValues, getNodeFactory, getTypeFactory, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, missingNode, nullNode, reader, reader, reader, reader, reader, reader, reader, reader, reader, readerFor, readerFor, readerFor, readerForArrayOf, readerForListOf, readerForMapOf, readerForUpdating, readerWithView, readResolve, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readTree, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValue, readValues, readValues, readValues, registeredModules, serializationConfig, stringNode, treeAsTokens, treeToValue, treeToValue, treeToValue, treeToValue, treeToValue, treeToValue, updateValue, valueToTree, writer, writer, writer, writer, writer, writer, writer, writer, writer, writer, writeReplace, writerFor, writerFor, writerFor, writerWithDefaultPrettyPrinter, writerWithView, writeTree, writeValue, writeValue, writeValue, writeValue, writeValue, writeValue, writeValueAsBytes, writeValueAsString, writeValueIntoBuffer
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
JsonMapper
public JsonMapper() -
JsonMapper
public JsonMapper(tools.jackson.core.json.JsonFactory f) -
JsonMapper
-
-
Method Details
-
builder
-
builder
-
builderWithJackson2Defaults
Modifies the settings of this builder to more closely match the default configs used in Jackson 2.x versions.This method is still a work in progress and may not yet fully replicate the default settings of Jackson 2.x.
-
rebuild
Description copied from class:ObjectMapperMethod for creating a newMapperBuilderfor constructing differently configuredObjectMapperinstance, starting with current configuration including base settings and registered modules.- Overrides:
rebuildin classObjectMapper
-
version
public tools.jackson.core.Version version()Description copied from class:ObjectMapperMethod that will return version information stored in and read from jar that contains this class.- Specified by:
versionin interfacetools.jackson.core.Versioned- Overrides:
versionin classObjectMapper
-
tokenStreamFactory
public tools.jackson.core.json.JsonFactory tokenStreamFactory()Description copied from class:ObjectMapperMethod that can be used to get hold ofTokenStreamFactorythat this mapper uses if it needs to constructJsonParsers and/orJsonGenerators.WARNING: note that all
ObjectReaderandObjectWriterinstances created by this mapper usually share the same configuredTokenStreamFactory, so changes to its configuration will "leak". To avoid such observed changes you should always use "with()" and "without()" method ofObjectReaderandObjectWriterfor changingStreamReadFeatureandStreamWriteFeaturesettings to use on per-call basis.- Overrides:
tokenStreamFactoryin classObjectMapper- Returns:
TokenStreamFactorythat this mapper uses when it needs to construct Json parser and generators
-
isEnabled
public boolean isEnabled(tools.jackson.core.json.JsonReadFeature f) -
isEnabled
public boolean isEnabled(tools.jackson.core.json.JsonWriteFeature f)
-