Skip to content

JSTEP 2

Tatu Saloranta edited this page Feb 11, 2019 · 69 revisions

JSTEP-2: Jackson 3 default setting, behavior changes

Note: matching github issue: #35

Author

Tatu Saloranta (@cowtowncoder)

Version history

  • 2019-02-10: create skeletal version

Overview

During Jackson 2.x development, certain default settings have proven either problematic by development team, or non-intuitive/non-optimal by users: latter indicated both by filed issues and comments on mailing list discussions. Since default settings and behavior are important part of the public API, changes have had to wait until major version change in most cases.

This document details proposed/planned changes.

Prior Work

Note that at the time of writing (February 2019), some of the work has already been done. Attempt is made to include such changes in this plan as if work was being planned, even if initial changes have been made.

Changes to "Feature" defaults

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

Changes to Date/Time defaults

  • Disable lenient setting (that is: default to "strict")
  • Check defaults of date/time handling

Misc other default setting, behavior changes

  • DecimalNode creation via JsonNodeFactory: default to NOT truncating trailing zeroes (minimal trimming), because JsonNode should by default expose content as close to way it came.

Clone this wiki locally