Skip to content

Jackson3 Changes

Tatu Saloranta edited this page Mar 1, 2017 · 32 revisions

Proposed Jackson 3.0 changes

JVM/JDK Compatibility

  • Jackson 3.x will require and be based on Java 8
    • with possible exception of jackson-core and jackson-annotations (?)

Module structure

  • Embed some/all Java8 modules
    • Embed "parameter names", "datatypes" (Optional)
    • Need to think of Java 8 date/time module (size)

Things to Remove

Major features

  1. Dataformat auto-detection (most in streaming, some in databind)
    • supported by some formats, but complicated to make work at higher level
  2. Old JSON Schema generation that builds JsonNode (already deprecated)
    • Not actively maintained since at least 2.4, deprecated by visitor-based approach since then

Features

MapperFeature:

  • USE_STD_BEAN_NAMING: should always be used, no need for old slightly differing algorithm

Entities

  • ContextualSerializer / ContextualDeserializer, ResolvableSerializer / ResolvableDeserializer
    • just embed as part of JsonSerializer / JsonDeserializer, with no-op implementation

Major API change areas:

  • JsonNode needs major rework; can do binary-incompatible return value changes

Changes to defaults

(will require wiki sub-page)

  • MapperFeature
    • SORT_PROPERTIES_ALPHABETICALLY: default to true (false really doesn't make much sense since it is unstable, and arbitrary based on JVM/JDK)
  • DeserializationFeature
    • READ_ENUMS_USING_TO_STRING: default to true (instead of false that relies on name())
    • FAIL_ON_UNKNOWN_PROPERTIES: default to false? (TOP REQUEST by users)
  • SerializationFeature
    • FAIL_ON_EMPTY_BEANS: default to false
  • Other
    • Check defaults of date/time handling

Clone this wiki locally