java.lang.Object
tools.jackson.databind.ObjectMapper
tools.jackson.databind.json.JsonMapper
- All Implemented Interfaces:
Serializable
,tools.jackson.core.TreeCodec
,tools.jackson.core.Versioned
JSON-specific
ObjectMapper
implementation.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Base implementation for "Vanilla"ObjectMapper
, used with JSON dataformat backend. -
Field Summary
Fields inherited from class tools.jackson.databind.ObjectMapper
_deserializationConfig, _deserializationContexts, _injectableValues, _rootDeserializers, _savedBuilderState, _serializationConfig, _serializationContexts, _streamFactory, _typeFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonMapper.Builder
builder()
static JsonMapper.Builder
builder
(tools.jackson.core.json.JsonFactory streamFactory) static JsonMapper.Builder
Modifies the settings of this builder to more closely match the default configs used in Jackson 2.x versions.boolean
isEnabled
(tools.jackson.core.json.JsonReadFeature f) boolean
isEnabled
(tools.jackson.core.json.JsonWriteFeature f) rebuild()
Method for creating a newMapperBuilder
for constructing differently configuredObjectMapper
instance, starting with current configuration including base settings and registered modules.static JsonMapper
shared()
Accessor method for getting globally shared "default"JsonMapper
instance: one that has default configuration, no modules registered, no config overrides.tools.jackson.core.json.JsonFactory
Method that can be used to get hold ofTokenStreamFactory
that this mapper uses if it needs to constructJsonParser
s and/orJsonGenerator
s.tools.jackson.core.Version
version()
Method that will return version information stored in and read from jar that contains this class.Methods inherited from class tools.jackson.databind.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, createObjectNode, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, deserializationConfig, getInjectableValues, getNodeFactory, getRegisteredModules, getTypeFactory, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, missingNode, nullNode, 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, serializationConfig, stringNode, treeAsTokens, treeToValue, treeToValue, treeToValue, updateValue, valueToTree, writer, writer, writer, writer, writer, writer, writer, writer, writer, writeReplace, writerFor, writerFor, writerFor, writerWithDefaultPrettyPrinter, writerWithView, writeTree, writeValue, writeValue, writeValue, writeValue, writeValue, writeValue, writeValueAsBytes, writeValueAsString
-
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:ObjectMapper
Method for creating a newMapperBuilder
for constructing differently configuredObjectMapper
instance, starting with current configuration including base settings and registered modules.- Overrides:
rebuild
in classObjectMapper
-
version
public tools.jackson.core.Version version()Description copied from class:ObjectMapper
Method that will return version information stored in and read from jar that contains this class.- Specified by:
version
in interfacetools.jackson.core.Versioned
- Overrides:
version
in classObjectMapper
-
tokenStreamFactory
public tools.jackson.core.json.JsonFactory tokenStreamFactory()Description copied from class:ObjectMapper
Method that can be used to get hold ofTokenStreamFactory
that this mapper uses if it needs to constructJsonParser
s and/orJsonGenerator
s.WARNING: note that all
ObjectReader
andObjectWriter
instances 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 ofObjectReader
andObjectWriter
for changingStreamReadFeature
andStreamWriteFeature
settings to use on per-call basis.- Overrides:
tokenStreamFactory
in classObjectMapper
- Returns:
TokenStreamFactory
that 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)
-