Skip to content

Jackson Release 2.14

Tatu Saloranta edited this page Mar 29, 2022 · 121 revisions

Jackson Version 2.14 is the next planned minor release from Jackson 2.x branch.

This wiki page gives a list of links to all changes (with brief descriptions) that will included, as well as about some of the active plans for changes and fixes to include.


Patches

No release yet

Documentation

None written yet.

Changes, compatibility

No planned changes

Changes, behavior

No planned changes


Major focus areas planned

Configurability ideas

Separate configuration settings for JsonNode, Enum, Date/Time.

NOTE: Covered in-detail here:

(Finally) Rewrite Creator Detection wrt Property Discovery (postponed from 2.13)

A class of impossible-to-fix problems related to Creator methods (constructors, factory methods) is due to "duality" of Creator discovery and General property discovery. Problem is that the process goes like this:

  1. General property discovery is performance by POJOPropertiesCollector: this is based on finding regular accessors (Fields, Getter/Setter methods) using both name-based auto-discovery and annotations, but also includes (annotated) Creator property parameters -- but notably not parameters of possible implicit (auto-discovered) Constructors. Accessors are combined into logical properties, expressed as (and accessed through) BasicBeanDescription container.
  2. BeanDeserializerFactory takes BasicBeanDescription and introspect possible Creators: this starts from scratch and finds potential Creators both by explicit annotations and possible auto-discovery. It will also try to combine already known Properties (from step 1) with now-located Creator parameters.

... and the problem is that "implicit" Creators -- ones with no explicitly annotated parameters (note: Not related to annotation of Creators method itself, but to parameter annotations!) -- will not be known during step (1) and as such will:

  • Not be renamed by PropertyNamingStrategy
  • Not get annotations from related accessors (normally annotation in one of accessors is essentially applied to all), nor contribute annotations to be used for others

Fixing this general problem by either:

  1. Moving Creator discovery as part of POJOPropertiesCollector (preferred), or
  2. Trying to combine pieces in step 2 more throughly (could resolve some of the issues)

would fix some of existing failing tests, and in particular help with newly found problems with Record handling (added in 2.12).

Processing Limits

Mentioned as one future JSTEP on https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP, there really should be limits to maximum size and/or complexity of input to process, mostly to prevent potential DoS attacks (as well as accidental "intern brought down our system by broken script" cases). There is some prior art in Woodstox, for example (see Woodstox-specific settings ("limits")).

NOTE: these limits are becoming more and more important over time -- a few DoS style issues have been resolved, but eventually it'd be good to have such "guard rails" built in core processing, as a baseline protection.


Changes implemented so far

Full Change list

Changes, core

None

  • #684: Add "JsonPointer#appendProperty" and "JsonPointer#appendIndex"
  • #715: Allow TokenFilters to keep empty arrays and objects
  • #733: Add StreamReadCapability.EXACT_FLOATS to indicate whether parser reports exact floating-point values
  • #3373: Change TypeSerializerBase to skip generator.writeTypePrefix() for null typeId
  • #3405: Create DataTypeFeature abstraction (for JSTEP-7) with placeholder features
  • #3419: Improve performance of UnresolvedForwardReference for forward reference resolution
  • #3421: Implement JsonNodeFeature.READ_NULL_PROPERTIES to allow skipping of JSON null values on reading

Changes, data formats

CBOR

  • #301: Missing configuration methods for format-specific parser/generator features
  • #312: Short NUL-only keys incorrectly detected as duplicates

CSV

  • #297: CSV schema caching POJOs with different views

Ion

  • #311: IonObjectMapper does not throw JacksonException for some invalid Ion

Smile

  • #301: Missing configuration methods for format-specific parser/generator features
  • #312: Short NUL-only keys incorrectly detected as duplicates

Changes, datatypes

  • #124: Add no-arg constructor for DateTimeDeserializer
  • #17: Add configurable amount representations for Joda Money module
  • #19: JsonValue.NULL deserialization has different behaviours with constructor properties vs public properties

Changes, JVM Languages

Changes, Other modules

Blackbird

Changes, other

  • #91: Annotation support should allow @JsonValue/JsonCreator on enum

Clone this wiki locally