Skip to content
Bluetape4k docs1.11

Jackson 2 Serialization

Latest stable Based on Bluetape4k release 1.11.0

bluetape4k-jackson2 is a module that wraps the Jackson 2.x library with Kotlin DSL and extension functions. This manual connects that purpose to the current build, source entry points, tests, configuration resources, and lifecycle evidence instead of duplicating the README feature list.

Use bluetape4k-jackson2 when the application needs encoding boundaries, resource ownership, streaming, compatibility, and malformed input. Start with the source entry points below and confirm that their ownership and failure contracts match the calling component. Prefer a smaller standard-library or already-adopted module when it satisfies the same contract without another runtime boundary.

dependencies {
implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>"))
implementation("io.github.bluetape4k:bluetape4k-jackson2")
}

Gradle project path: :bluetape4k-jackson2. Source directory: io/jackson2.

The first source-level concepts to inspect are Jackson, JacksonSerializer, JsonGeneratorExtensions, JsonMapperSupport, JsonNodeExtensions, AsyncJsonParser, SuspendJsonParser, and CborJacksonSerializer. File names are navigation anchors; read each declaration and its tests before treating it as a public contract.

Add the coordinate above, refresh Gradle, and start from the smallest entry point that owns the required task. Open Jackson first; it is a concrete source entry point for the module.

Entry pointWhat to verify
JacksonInspect this declaration’s constructors, functions, and ownership contract.
JacksonSerializerInspect this declaration’s constructors, functions, and ownership contract.
JsonGeneratorExtensionsInspect this declaration’s constructors, functions, and ownership contract.
JsonMapperSupportInspect this declaration’s constructors, functions, and ownership contract.
JsonNodeExtensionsInspect this declaration’s constructors, functions, and ownership contract.
AsyncJsonParserInspect this declaration’s constructors, functions, and ownership contract.
SuspendJsonParserInspect this declaration’s constructors, functions, and ownership contract.
CborJacksonSerializerInspect this declaration’s constructors, functions, and ownership contract.
CborJsonSerializerInspect this declaration’s constructors, functions, and ownership contract.
IonJacksonSerializerInspect this declaration’s constructors, functions, and ownership contract.

The README evidence is organized around Overview, Why Jackson2 in bluetape4k, Architecture, Class Structure, Jackson Serialization Pipeline, Field Encryption Flow (@JsonTinkEncrypt), Recommended Usage Scenarios, Anti-Patterns, Key Features, and 1. JsonMapper DSL. Use those topics as a navigation map, then confirm behavior in source and tests. Keep adoption narrow and connect owned resources to the caller lifecycle.

The current build declares these integration edges:

implementation(platform(libs.jackson.bom))
implementation(platform(libs.spring.boot.dependencies))
api(libs.jackson.core)
api(libs.jackson.databind)
api(libs.jackson.datatype.jdk8)
api(libs.jackson.datatype.jsr310)
api(libs.jackson.module.kotlin)
api(libs.jackson.module.parameter.names)
api(libs.jackson.module.blackbird)
compileOnly(libs.jackson.dataformat.properties)
compileOnly(libs.jackson.dataformat.yaml)
compileOnly(libs.jackson.dataformat.avro)

Treat compileOnly edges as caller-provided capabilities and verify runtime availability before using their APIs.

Configuration resources found in the module:

Read property names and defaults from these resources and the binding source before overriding them.

Failure semantics are defined by the linked entry points and tests, not inferred from the artifact name. Keep cancellation and timeout signals intact, close owned resources, and translate backend exceptions only at a boundary that can add a stable domain contract. Use the test anchors below to verify the exact behavior before adding retries or fallbacks.

Track payload size, allocation, latency, malformed-input rate, resource closure, and protocol errors. Keep capacity, timeout, retry, and shutdown settings next to the component that owns the resource; avoid process-wide defaults that hide which caller accepted the trade-off.

Run the module test task:

Terminal window
./gradlew :bluetape4k-jackson2:test --no-configuration-cache

Representative test anchors:

No dedicated workshop path is registered in the manual manifest. Use the module README and the representative tests above as runnable evidence.

This page documents the repository state represented by the linked source and tests. It does not turn optional backends into application defaults or claim performance without a benchmark artifact. Re-check compatibility and lifecycle notes when the module version changes.

These diagrams are loaded directly from README assets published with the 1.11.0 release and pinned to its immutable commit. They describe this manual’s released structure and runtime flows, not later Snapshot changes. Select a preview to open the SVG at the same release commit.

Class Structure diagram

Release README: io/jackson2/README.md

Jackson Serialization Pipeline diagram

Release README: io/jackson2/README.md

Field Encryption Flow (@JsonTinkEncrypt) diagram

Section titled “Field Encryption Flow (@JsonTinkEncrypt) diagram”

Field Encryption Flow (@JsonTinkEncrypt) diagram

Release README: io/jackson2/README.md