Sneak Peek at Jackson 2.13

2.13: a bit smaller release again

Bigger Changes in 2.13

  1. Baseline JDK is now JDK 8 — not just for building but also running.
  2. Full set of “Jakarta” modules to (eventually) replace “JAX”/”Javax” modules (for background, search for “jakarta vs javax”, and read f.ex “Jakarta EE Without javax: The World Won’t End This Time Either”) — replaces 2.12-only Maven classifier approach used for JAX-RS
  3. New dataformat module for reading/writing TOML: jackson-dataformat-toml

Jackson 2.13: Now Java8 only

  1. It is possible to reduce code differences between Jackson 2.x and upcoming 3.x (from master branch) — 3.x was already Java 8 based
  2. Cleaner 2.x APIs for Builder-style configuration
  3. Ability to use cleaner Java 8 code constructs where applicable
  4. Possibly embed one of Java 8 modules (Optional support, Construct parameter name detection) for later 2.x versions (not yet embedded in 2.13)

Full set of Jakarta modules to replace JAX/Javax (Java EE) modules

  • JAXB annotation support module
  • JAX-RS providers (for Jersey et al)
  • JSON-P (JSR-353) datatype module

Support for TOML with jackson-dataformat-toml

# This is a TOML document

title = "TOML Example"

[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00
{
"title" : "TOML Example",
"owner" : {
"name" : "Tom Preston-Werner",
"dob" : "1979-05-27T07:32:00-08:00"
}
}

Other notable inclusions in 2.13

  • New “No-Constructor module” — jackson-module-no-ctor-deser — with which Jackson can force instantiation of POJOs without 0-argument constructor (see module README for details)
  • Improved reporting of JsonLocation for low-level parsing exceptions: offsets for binary content, and content snippet only for textual formats (no more garbage “source” included). Multiple issues fixed, see jackson-core#694 (for example)
  • For XML, ToXmlGenerator.Feature.UNWRAP_ROOT_OBJECT_NODE to avoid writing extra wrapper <ObjectNode> wrapper (see dataformat-xml#441 for details)
  • For Avro, some support for “Logical Types” (Java 8 date/time types) (see dataformat-avro#283 for details)

What else?

--

--

--

Open Source developer, most known for Jackson data processor (nee “JSON library”), author of many, many other OSS libraries for Java, from ClassMate to Woodstox

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Updates to our App and process during COVID-19

The perfect kit starter for a Symfony 4 project with Docker and PHP 7.2

Make Your Microservices Bulletproof With Netflix Hystrix

delve’s Mastodon Resource List, v1 (2021-02-11)

Social networking, back in your hands / Follow friends and discover new ones among more than 4.4M people. Publish anything you want: / links, pictures, text, video. All on a platform that is community-owned and ad-free. (https://joinmastodon.org/)

Research/Spike/Build-Encouraging Innovation While Minimizing System Risk

Disaster Recovery and Solutions for Validated Systems

Microsoft365’s effective project process: Plan — Realize — Evaluate

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
@cowtowncoder

@cowtowncoder

Open Source developer, most known for Jackson data processor (nee “JSON library”), author of many, many other OSS libraries for Java, from ClassMate to Woodstox

More from Medium

Converting between java.util.UUID and byte[]

Purely Functional lg(n)-Algorithm Design

Embedding Tribuo ML library as a JUnit extension

Integrating Kafka with Coherence