Uses of Class
com.fasterxml.jackson.databind.ObjectWriter
Packages that use ObjectWriter
Package
Description
Basic data binding (mapping) functionality that
allows for reading JSON content into Java Objects (POJOs)
and JSON Trees (
JsonNode), as well as
writing Java Objects and trees as JSON.Jackson-based Jakarta-RS provider that can automatically
serialize and deserialize resources for
JSON content type (MediaType).
-
Uses of ObjectWriter in com.fasterxml.jackson.databind
Methods in com.fasterxml.jackson.databind that return ObjectWriterModifier and TypeMethodDescriptionprotected ObjectWriterObjectWriter._new(ObjectWriter.GeneratorSettings genSettings, ObjectWriter.Prefetch prefetch) Overridable factory method called by various "withXxx()" methods.protected ObjectWriterObjectWriter._new(ObjectWriter base, JsonFactory f) Overridable factory method called by various "withXxx()" methodsprotected ObjectWriterObjectWriter._new(ObjectWriter base, SerializationConfig config) Overridable factory method called by various "withXxx()" methodsprotected ObjectWriterObjectMapper._newWriter(SerializationConfig config) Factory method sub-classes must override, to produceObjectWriterinstances of proper sub-typeprotected ObjectWriterObjectMapper._newWriter(SerializationConfig config, FormatSchema schema) Factory method sub-classes must override, to produceObjectWriterinstances of proper sub-typeprotected ObjectWriterObjectMapper._newWriter(SerializationConfig config, JavaType rootType, PrettyPrinter pp) Factory method sub-classes must override, to produceObjectWriterinstances of proper sub-typeObjectWriter.forType(TypeReference<?> rootType) Method that will construct a new instance that uses specific type as the root type for serialization, instead of runtime dynamic type of the root object itself.Method that will construct a new instance that uses specific type as the root type for serialization, instead of runtime dynamic type of the root object itself.Method that will construct a new instance that uses specific type as the root type for serialization, instead of runtime dynamic type of the root object itself.ObjectWriter.with(Base64Variant b64variant) Method that will construct a new instance that uses specified defaultBase64Variantfor base64 encodingObjectWriter.with(FormatFeature feature) ObjectWriter.with(FormatSchema schema) Method that will construct a new instance that uses specific format schema for serialization.ObjectWriter.with(CharacterEscapes escapes) ObjectWriter.with(JsonFactory f) ObjectWriter.with(JsonGenerator.Feature feature) ObjectWriter.with(PrettyPrinter pp) Method that will construct a new instance that will use specified pretty printer (or, if null, will not do any pretty-printing)ObjectWriter.with(StreamWriteFeature feature) ObjectWriter.with(ContextAttributes attrs) ObjectWriter.with(DatatypeFeature feature) Method for constructing a new instance that is configured with specified feature enabled.ObjectWriter.with(FilterProvider filterProvider) Method that will construct a new instance that uses specified provider for resolving filter instances by id.ObjectWriter.with(SerializationFeature feature) Method for constructing a new instance that is configured with specified feature enabled.ObjectWriter.with(SerializationFeature first, SerializationFeature... other) Method for constructing a new instance that is configured with specified features enabled.ObjectWriter.with(DateFormat df) Fluent factory method that will construct a new writer instance that will use specified date format for serializing dates; or if null passed, one that will serialize dates as numeric timestamps.ObjectWriter.withAttribute(Object key, Object value) ObjectWriter.withAttributes(Map<?, ?> attrs) Mutant factory method that allows construction of a new writer instance that uses specified set of default attribute values.ObjectWriter.withDefaultPrettyPrinter()Method that will construct a new instance that will use the default pretty printer for serialization.ObjectWriter.withFeatures(FormatFeature... features) ObjectWriter.withFeatures(JsonGenerator.Feature... features) ObjectWriter.withFeatures(DatatypeFeature... features) Method for constructing a new instance that is configured with specified features enabled.ObjectWriter.withFeatures(SerializationFeature... features) Method for constructing a new instance that is configured with specified features enabled.ObjectWriter.without(FormatFeature feature) ObjectWriter.without(JsonGenerator.Feature feature) ObjectWriter.without(StreamWriteFeature feature) ObjectWriter.without(DatatypeFeature feature) Method for constructing a new instance that is configured with specified feature disabled.ObjectWriter.without(SerializationFeature feature) Method for constructing a new instance that is configured with specified feature disabled.ObjectWriter.without(SerializationFeature first, SerializationFeature... other) Method for constructing a new instance that is configured with specified features disabled.ObjectWriter.withoutAttribute(Object key) ObjectWriter.withoutFeatures(FormatFeature... features) ObjectWriter.withoutFeatures(JsonGenerator.Feature... features) ObjectWriter.withoutFeatures(DatatypeFeature... features) Method for constructing a new instance that is configured with specified features disabled.ObjectWriter.withoutFeatures(SerializationFeature... features) Method for constructing a new instance that is configured with specified features disabled.ObjectWriter.withoutRootName()Convenience method that is same as calling:withRootName("")which will forcibly prevent use of root name wrapping when writing values with thisObjectWriter.ObjectWriter.withRootName(PropertyName rootName) ObjectWriter.withRootName(String rootName) Method for constructing a new instance with configuration that specifies what root name to use for "root element wrapping".ObjectWriter.withRootValueSeparator(SerializableString sep) ObjectWriter.withRootValueSeparator(String sep) ObjectWriter.withSchema(FormatSchema schema) Deprecated.ObjectWriter.withType(TypeReference<?> rootType) Deprecated.since 2.5 UseforType(TypeReference)insteadDeprecated.since 2.5 UseforType(JavaType)insteadDeprecated.since 2.5 UseforType(Class)insteadMethod that will construct a new instance that uses specified serialization view for serialization (with null basically disables view processing)ObjectMapper.writer()Convenience method for constructingObjectWriterwith default settings.ObjectMapper.writer(Base64Variant defaultBase64) Factory method for constructingObjectWriterthat will use specified Base64 encoding variant for Base64-encoded binary data.ObjectMapper.writer(FormatSchema schema) Factory method for constructingObjectWriterthat will pass specific schema object toJsonGeneratorused for writing content.ObjectMapper.writer(CharacterEscapes escapes) Factory method for constructingObjectReaderthat will use specified character escaping details for output.ObjectMapper.writer(PrettyPrinter pp) Factory method for constructingObjectWriterthat will serialize objects using specified pretty printer for indentation (or if null, no pretty printer)ObjectMapper.writer(ContextAttributes attrs) Factory method for constructingObjectWriterthat will use specified default attributes.ObjectMapper.writer(FilterProvider filterProvider) Factory method for constructingObjectWriterthat will serialize objects using specified filter provider.ObjectMapper.writer(SerializationFeature feature) Factory method for constructingObjectWriterwith specified feature enabled (compared to settings that this mapper instance has).ObjectMapper.writer(SerializationFeature first, SerializationFeature... other) Factory method for constructingObjectWriterwith specified features enabled (compared to settings that this mapper instance has).ObjectMapper.writer(DateFormat df) Factory method for constructingObjectWriterthat will serialize objects using specifiedDateFormat; or, if null passed, using timestamp (64-bit number.ObjectMapper.writerFor(TypeReference<?> rootType) Factory method for constructingObjectWriterthat will serialize objects using specified root type, instead of actual runtime type of value.Factory method for constructingObjectWriterthat will serialize objects using specified root type, instead of actual runtime type of value.Factory method for constructingObjectWriterthat will serialize objects using specified root type, instead of actual runtime type of value.ObjectMapper.writerWithDefaultPrettyPrinter()Factory method for constructingObjectWriterthat will serialize objects using the default pretty printer for indentationObjectMapper.writerWithType(TypeReference<?> rootType) Deprecated.Since 2.5, useObjectMapper.writerFor(TypeReference)insteadObjectMapper.writerWithType(JavaType rootType) Deprecated.Since 2.5, useObjectMapper.writerFor(JavaType)insteadObjectMapper.writerWithType(Class<?> rootType) Deprecated.Since 2.5, useObjectMapper.writerFor(Class)insteadObjectMapper.writerWithView(Class<?> serializationView) Factory method for constructingObjectWriterthat will serialize objects using specified JSON View (filter).Methods in com.fasterxml.jackson.databind with parameters of type ObjectWriterModifier and TypeMethodDescriptionprotected ObjectWriterObjectWriter._new(ObjectWriter base, JsonFactory f) Overridable factory method called by various "withXxx()" methodsprotected ObjectWriterObjectWriter._new(ObjectWriter base, SerializationConfig config) Overridable factory method called by various "withXxx()" methodsObjectWriter.Prefetch.forRootType(ObjectWriter parent, JavaType newType) Constructors in com.fasterxml.jackson.databind with parameters of type ObjectWriterModifierConstructorDescriptionprotectedObjectWriter(ObjectWriter base, JsonFactory f) protectedObjectWriter(ObjectWriter base, SerializationConfig config) Copy constructor used for building variations.protectedObjectWriter(ObjectWriter base, SerializationConfig config, ObjectWriter.GeneratorSettings genSettings, ObjectWriter.Prefetch prefetch) Copy constructor used for building variations. -
Uses of ObjectWriter in com.fasterxml.jackson.jakarta.rs.base
Methods in com.fasterxml.jackson.jakarta.rs.base with parameters of type ObjectWriterModifier and TypeMethodDescriptionprotected abstract EP_CONFIGProviderBase._configForWriting(ObjectWriter writer, Annotation[] annotations) protected JsonGeneratorProviderBase._createGenerator(ObjectWriter writer, OutputStream rawStream, JsonEncoding enc) Overridable helper method called to create aJsonGeneratorfor writing contents into given rawOutputStream. -
Uses of ObjectWriter in com.fasterxml.jackson.jakarta.rs.cfg
Fields in com.fasterxml.jackson.jakarta.rs.cfg declared as ObjectWriterMethods in com.fasterxml.jackson.jakarta.rs.cfg that return ObjectWriterModifier and TypeMethodDescriptionfinal ObjectWriterEndpointConfigBase.getWriter()abstract ObjectWriterObjectWriterModifier.modify(EndpointConfigBase<?> endpoint, MultivaluedMap<String, Object> responseHeaders, Object valueToWrite, ObjectWriter w, JsonGenerator g) Method called to let modifier make any changes it wants to to objects used for writing response for specified endpoint.Methods in com.fasterxml.jackson.jakarta.rs.cfg with parameters of type ObjectWriterModifier and TypeMethodDescriptionprotected THISEndpointConfigBase.initWriter(ObjectWriter writer) abstract ObjectWriterObjectWriterModifier.modify(EndpointConfigBase<?> endpoint, MultivaluedMap<String, Object> responseHeaders, Object valueToWrite, ObjectWriter w, JsonGenerator g) Method called to let modifier make any changes it wants to to objects used for writing response for specified endpoint. -
Uses of ObjectWriter in com.fasterxml.jackson.jakarta.rs.json
Methods in com.fasterxml.jackson.jakarta.rs.json with parameters of type ObjectWriterModifier and TypeMethodDescriptionprotected JsonEndpointConfigJacksonJsonProvider._configForWriting(ObjectWriter writer, Annotation[] annotations) static JsonEndpointConfigJsonEndpointConfig.forWriting(ObjectWriter writer, Annotation[] annotations, String defaultJsonpMethod)
with(FormatSchema)instead