java.lang.Object
tools.jackson.databind.ObjectMapper
tools.jackson.dataformat.avro.AvroMapper
- All Implemented Interfaces:
Serializable,tools.jackson.core.TreeCodec<tools.jackson.databind.JsonNode>,tools.jackson.core.Versioned
public class AvroMapper
extends tools.jackson.databind.ObjectMapper
Convenience
AvroMapper, which is mostly similar to simply
constructing a mapper with AvroFactory, but also adds little
bit of convenience around AvroSchema generation.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBase implementation for "Vanilla"ObjectMapper, used with Avro backend. -
Field Summary
Fields inherited from class tools.jackson.databind.ObjectMapper
_deserializationConfig, _deserializationContexts, _injectableValues, _rootDeserializers, _savedBuilderState, _serializationConfig, _serializationContexts, _streamFactory, _typeFactory -
Constructor Summary
ConstructorsConstructorDescriptionConstructor that will construct mapper with standardAvroFactoryas codec, and will also registerAvroModule.Constructor that will construct mapper with givenAvroFactory, as well as register standardAvroModule(with default settings). -
Method Summary
Modifier and TypeMethodDescriptionprotected tools.jackson.core.JacksonException_invalidSchemaDefinition(tools.jackson.databind.JavaType type, Exception e0) static AvroMapper.Builderbuilder()static AvroMapper.Builderbuilder(AvroFactory streamFactory) booleanbooleanrebuild()Factory method for constructingAvroSchemaby introspecting given POJO type and building schema that contains specified properties.schemaFor(tools.jackson.databind.JavaType type) Factory method for constructingAvroSchemaby introspecting given POJO type and building schema that contains specified properties.schemaFrom(File schemaFile) Convenience method for readingAvroSchemafrom given encoded JSON representation.Method for reading an Avro Schema from givenInputStream, and once done (successfully or not), closing the stream.schemaFrom(String schemaAsString) Convenience method for readingAvroSchemafrom given encoded JSON representation.static AvroMappershared()Accessor method for getting globally shared "default"AvroMapperinstance: one that has default configuration, no modules registered, no config overrides.tools.jackson.core.Versionversion()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, 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
-
Constructor Details
-
AvroMapper
public AvroMapper()Constructor that will construct mapper with standardAvroFactoryas codec, and will also registerAvroModule. -
AvroMapper
Constructor that will construct mapper with givenAvroFactory, as well as register standardAvroModule(with default settings). -
AvroMapper
-
-
Method Details
-
builder
-
builder
-
rebuild
- Overrides:
rebuildin classtools.jackson.databind.ObjectMapper
-
version
public tools.jackson.core.Version version()- Specified by:
versionin interfacetools.jackson.core.Versioned- Overrides:
versionin classtools.jackson.databind.ObjectMapper
-
tokenStreamFactory
- Overrides:
tokenStreamFactoryin classtools.jackson.databind.ObjectMapper
-
isEnabled
-
isEnabled
-
schemaFor
Factory method for constructingAvroSchemaby introspecting given POJO type and building schema that contains specified properties.Resulting schema object does not use separate reader/writer schemas.
-
schemaFor
Factory method for constructingAvroSchemaby introspecting given POJO type and building schema that contains specified properties.Resulting schema object does not use separate reader/writer schemas.
-
_invalidSchemaDefinition
protected tools.jackson.core.JacksonException _invalidSchemaDefinition(tools.jackson.databind.JavaType type, Exception e0) -
schemaFrom
Method for reading an Avro Schema from givenInputStream, and once done (successfully or not), closing the stream.Resulting schema object does not use separate reader/writer schemas.
- Throws:
IOException
-
schemaFrom
Convenience method for readingAvroSchemafrom given encoded JSON representation.Resulting schema object does not use separate reader/writer schemas.
- Throws:
IOException
-
schemaFrom
Convenience method for readingAvroSchemafrom given encoded JSON representation.Resulting schema object does not use separate reader/writer schemas.
- Throws:
IOException
-