Skip to content

Jackson Release 2.18

Tatu Saloranta edited this page Jun 20, 2024 · 116 revisions

Jackson Version 2.18 development is planned to start in March, 2024.

This wiki page gives a list of links to all changes (with brief descriptions) that will be included, as well as about original plans for bigger changes (and in some cases changes to plans, postponing).

Status

Branch is under actively development as of June 2024.

Patches

No release yet

Documentation

Articles, Blog posts

Changes, compatibility

Compatibility: platform requirements

JDK

Same as Jackson 2.17

Kotlin

Kotlin 1.7.x no longer supported (1.8, 1.9, 2.0 are): kotlin#803

Changes, behavior


Planned major things

Most wanted Features considered

Performance improvements planned

  • More optimized JsonParser.getFloatValue() / JsonParser.getDoubleValue(): avoid String creation when calling FastDoubleParser
    • core#1229: Add char[] versions for NumberInput parseFloat, parseDouble, parseBigInteger
      • implemented; but not used by databind or core itself
    • core#1284: Optimize JsonParser.getDoubleValue()/getFloatValue()/getDecimalValue() to avoid String allocation
      • possible regression for Deferred handling: currently eagerly construct String to ensure most accurate representations (but should instead only do when required)

Major focus area(s), implemented

Rewrite POJO Property Introspection

  • Has been on top spot of priority lists since at least 2.8 (mentioned in release notes) -- 8 years ago!!!
  • [https://github.com/FasterXML/jackson-databind/issues/4515] -- fully rewritten POJO (including Record) Property Introspection
    • Solved 5 previously failing unit tests:
      • (only for 3.0) #538: Injection when there is cyclic references fails
      • #806: Problem with NamingStrategy, creator methods with implicit names
      • #2977: Incompatible FAIL_ON_MISSING_PRIMITIVE_PROPERTIES and field level @JsonProperty
      • #3241: constructorDetector seems to invalidate defaultSetterInfo for nullability
      • #4119: Exception when deserialization uses a record with a constructor property with access=READ_ONLY

Most wanted Features implemented

  • databind#562: Allow @JsonAnySetter to flow through Creators

Full Change list

Changes, core

  • #1230: Improve performance of float and double parsing from TextBuffer
  • #1251: InternCache - replace synchronized with ReentrantLock
  • #1252: ThreadLocalBufferManager replace synchronized with ReentrantLock
  • #1257: Increase InternCache default max size from 100 to 200
  • #1262: Add diagnostic method pooledCount() in RecyclerPool
  • #1264: Rename shaded ch.randelshofer:fastdoubleparser classes to prevent use by downstream consumers
  • #1271: Deprecate LockFreePool implementation in 2.18 (remove from 3.0)
  • #1274: NUL-corrupted keys, values on JSON serialization
  • #1277: Add back Java 22 optimisation in FastDoubleParser
  • #1310: Add new StreamReadConstraints (maxTokenCount) to limit maximum number of Tokens allowed per document
  • #562: Allow @JsonAnySetter to flow through Creators
  • #806: Problem with NamingStrategy, creator methods with implicit names
  • #2977: Incompatible FAIL_ON_MISSING_PRIMITIVE_PROPERTIES and field level @JsonProperty
  • #3241: constructorDetector seems to invalidate defaultSetterInfo for nullability
  • #4119: Exception when deserialization uses a record with a constructor property with access=READ_ONLY
  • #4356: BeanDeserializerModifier::updateBuilder() doesn't work for beans with Creator methods
  • #4407: null type id handling does not work with writeTypePrefix()
  • #4452: @JsonProperty not serializing field names properly on @JsonCreator in Record
  • #4453: Allow JSON Integer to deserialize into a single-arg constructor of parameter type double
  • #4456: Rework locking in DeserializerCache
  • #4458: Rework synchronized block from BeanDeserializerBase
  • #4464: When Include.NON_DEFAULT setting is used, isEmpty() method is not called on the serializer
  • #4472: Rework synchronized block in TypeDeserializerBase
  • #4483: Remove final on method BeanSerializer.serialize()
  • #4515: Rewrite Bean Property Introspection logic in Jackson 2.x
  • #4570: Deprecate ObjectMapper.canDeserialize()/ObjectMapper.canSerialize()
  • #4580: Add MapperFeature.SORT_CREATOR_PROPERTIES_BY_DECLARATION_ORDER to use Creator properties' declaration order for sorting

Changes, data formats

  • #494: Avro Schema generation: allow mapping Java Enum properties to Avro String values
  • #468: Remove synchronization from CsvMapper
  • #469: Allow CSV to differentiate between null and empty fields (foo,,bar vs. foo,"",bar)
  • #484: Rework synchronization in ProtobufMapper

Changes, Other modules

JAXB Annotations

  • #233: Tolerate JAX-RS 2.2 in jackson-module-jaxb-annotations so that it can be deployed in Liberty alongside features which use 2.2

Changes, JVM Languages

  • #782: Content marked as deprecated has been reorganized. Several constructors and accessors to properties of KotlinModule.Builder that were marked as DeprecationLevel.ERROR have been removed. Also, the content marked as DeprecationLevel.WARNING is now DeprecationLevel.ERROR.
  • #803: Update Kotlin version; remove support for 1.7

Changes, Providers

Changes, other

Clone this wiki locally