-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Jackson Release 2.16
Jackson Version 2.16 development started in May 2023, after release of 2.15. One Release Candidate has been released so far: 2.16.0-rc1 on October 20, 2023.
This wiki page gives a list of links to all changes (with brief descriptions) that will be included, as well as about plans for bigger changes.
Branch is under development as of October 2023.
No release yet
Guice 7 module is a "Jakarta" variant with jakarta.inject instead of javax.inject): needed to work with Guice 7.
Same as Jackson 2.15
kotlin-core versions supported changed, as follows (see module-kotlin#684 for details)
- Jackson 2.15.x: Kotlin-core 1.5 - 1.8
- Jackson 2.16.x: Kotlin-core 1.6 - 1.9
that is, support for 1.5 was dropped and support for 1.9 now verified.
jackson-module-kotlin removes MissingKotlinParameterException and replaces it with MismatchedInputException, which was its parent class(KOTLIN#617).
- jackson-datatype-pcollections: dependency to PCollections updates from 2.x to 4.x
- Default setting for
StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION(akaJsonParser.Feature.INCLUDE_SOURCE_IN_LOCATION) changed tofalsefor improved defaults wrt security (less information leakage by default).- See jackson-core#991 for details.
- Message for non-included source now "REDACTED" (instead of "UNKNOWN"), see jackson-core#1039 for details.
- Behavior of
Version(accessible byJsonFactory.version()and similar accessors inJsonParser,JsonGeneratoretc) comparsion (Version.compareTo()) changed to consider Snapshot version, if any,
-
java.util.Localecoercion from empty String will now result inLocale.ROOT(and notnull) even ifDeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECTis enabled (see databind#4009)
2.16 adds maximum processing limits for certain aspects of content generation (writing, serialization) as described below. Addition of the general feature (and one of limits) was included under jackson-core#1048.
Implemented limits are:
- Expressed in input units --
bytes orchars -- depending on input source - Defined as longest allowed length, but not necessarily imposed at 100% accuracy: that is, if maximum allowed length is specified as 1000 units, something with length of, say 1003 may not cause exception (but 1500 would)
- Defined in new
StreamWriteConstraintsclass, configurable on per-JsonFactorybasis
Implementation of jackson-core#1046 sets upper limit of longest accepted input for parsing. Default limits is:
- Unlimited (marked as
-1) -- no maximum length specified for input
Implementation of jackson-core#1055 sets upper limit on maximum output nesting (Objects, Arrays) when generating output (writing JSON etc). Default limit is:
- 1000 levels
Implementation of jackson-core#1047 sets maximum length of allowed Property names when parsing input. Default limit is:
- 50,000 units (bytes or chars, depending on input source)
Implemented, See Above.
Partial work, including:
-
#1042: Allow configuring spaces before and/or after the colon in
DefaultPrettyPrinter -
#3965: Add
JsonNodeFeature.WRITE_PROPERTIES_SORTEDfor sortingObjectNodeproperties on serialization
Not Started Yet (same old story...)
-
#223: Add new
OptBooleanvalued property in@JsonTypeInfoto allow per-type configuration of strict type id handling -
#229: Add
JsonTypeInfo.Valueobject (backport from 3.0) -
#234: Add new
JsonTypeInfo.Id.SIMPLE_NAME
-
#991: Change
StreamReadFeature.INCLUDE_SOURCE_IN_LOCATIONdefault tofalsein Jackson 2.16 -
#1007: Improve error message for
StreamReadConstraintsviolations -
#1015:
JsonFactoryimplementations should respectCANONICALIZE_FIELD_NAMES -
#1035: Root cause for failing test for
testMangledIntsBytes()inParserErrorHandlingTest -
#1036: Allow all array elements in
JsonPointerBasedFilter -
#1039: Indicate explicitly blocked sources as "REDACTED" instead of "UNKNOWN" in
JsonLocation - #1041: Start using AssertJ in unit tests
-
#1042: Allow configuring spaces before and/or after the colon in
DefaultPrettyPrinter(for Canonical JSON) - #1046: Add configurable limit for the maximum number of bytes/chars of content to parse before failing
- #1047: Add configurable limit for the maximum length of Object property names to parse before failing
-
#1048: Add configurable processing limits for JSON generator (
StreamWriteConstraints) -
#1050: Compare
_snapshotInfoinVersion -
#1051: Add
JsonGeneratorDecoratorto allow decoratingJsonGenerators -
#1064: Add full set of
BufferRecyclerPoolimplementations -
#1066: Add configurable error report behavior via
ErrorReportConfiguration -
#1081: Make
ByteSourceJsonBootstrapperuseStringReaderfor < 8KiB byte[] inputs -
#1089: Allow pluggable buffer recycling via new
BufferRecyclerPoolextension point
- #2502: Add a way to configure caches Jackson uses
-
#2787: Mix-ins do not work for
Enums -
#3251: Generic class with generic field of runtime type
Doubleis deserialized asBigDecimalwhen used with@JsonTypeInfoandJsonTypeInfo.As.EXISTING_PROPERTY -
#3647:
@JsonIgnorePropertiesnot working with@JsonValue - #3780: Deprecated JsonNode.with(String) suggests using JsonNode.withObject(String) but it is not the same thing
-
#3838: Difference in the handling of
ObjectId-propertyinJsonIdentityInfodepending on the deserialization route -
#3877: Add new
OptBooleanvalued property in@JsonTypeInfo, handling, to allow per-polymorphic type loose Type Id handling -
#3906: Regression: 2.15.0 breaks deserialization for records when
mapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE) - #3924: Incorrect target type when disabling coercion, trying to deserialize String from Array/Object
-
#3928:
@JsonPropertyon constructor parameter changes default field serialization order -
#3950: Create new
JavaTypesubtypeIterationType(extendingSimpleType) -
#3953: Use
JsonTypeInfo.Valuefor annotation handling -
#3965: Add
JsonNodeFeature.WRITE_PROPERTIES_SORTEDfor sortingObjectNodeproperties on serialization (for Canonical JSON) -
#4008: Optimize
ObjectNodefindValue(s) and findParent(s) fast paths -
#4009: Locale "" is deserialised as
nullifACCEPT_EMPTY_STRING_AS_NULL_OBJECTis enabled -
#4011: Add guardrail setting for
TypeParserhandling of type parameters -
#4036: Use
@JsonPropertyfor Enum values also whenREAD_ENUMS_USING_TO_STRINGenabled -
#4037: Fix
Enumdeserialization to use@JsonProperty,@JsonAliaseven ifEnumNamingStrategyused -
#4039: Use
@JsonPropertyand lowercase feature when serializing Enums despite using toString() -
#4040: Use
@JsonPropertyoverEnumNamingStrategyfor Enum serialization - #4041: Actually cache EnumValues#internalMap
-
#4047:
ObjectMapper.valueToTree()will ignore the configurationSerializationFeature.WRAP_ROOT_VALUE - #4056: Provide the "ObjectMapper.treeToValue(TreeNode, TypeReference)" method
-
#4060: Expose
NativeImageUtil.isRunningInNativeImage()method -
#4061: Add JsonTypeInfo.Id.SIMPLE_NAME which defaults type id to
Class.getSimpleName() -
#4071: Impossible to deserialize custom
Throwablesub-classes that do not have single-String constructors -
#4078:
java.desktopmodule is no longer optional -
#4082:
ClassUtilfails withjava.lang.reflect.InaccessibleObjectExceptiontrying to setAccessible onOptionalIntwith JDK 17+ - #4090: Support sequenced collections (JDK 21)
-
#4095: Add
withObjectProperty(String),withArrayProperty(String)inJsonNode -
#4096: Change
JsonNode.withObject(String)to work similar towithArray()wrt argument -
#4144: Log WARN if deprecated subclasses of
PropertyNamingStrategyis used -
#4145: NPE when transforming a tree to a model class object, at
ArrayNode.elements() -
#4153: Deprecated
ObjectReader.withType(Type)has no direct replacement; needforType(Type) -
#4159: Add new
DefaultTyping.NON_FINAL_AND_ENUMSto allow Default Typing forEnums -
#4164: Do not rewind
positionwhen serializing directByteBuffer
-
#438:
BigIntegerandBigDecimalare quoted ifCsvGenerator.Feature.ALWAYS_QUOTE_STRINGSenabled
- #403: Remove Smile-specific buffer-recycling
-
#148:
@JacksonXmlElementWrappernot respected when serializingIterators /Iterables - #302: Unable to serialize top-level Java8 Stream
-
#329:
@JacksonXmlElementWrapperignored onStream -
#599: Use
IterationTypeinTypeUtil
-
#400:
IllegalArgumentExceptionwhen attempting to decode invalid UTF-8 surrogate by SnakeYAML -
#406:
NumberFormatExceptionfrom SnakeYAML due to int overflow for corrupt YAML version -
#435: Minor parsing validation miss: tagged as
int, exception on underscore-only values - #437: Update SnakeYAML dependency to 2.2
-
#272:
JsonFormat.Feature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDSnot respected when deserialisingInstants
- #90: Cache Serialization serializes empty contents
- #113: Update default Guava dependency for Jackson 2.16 from Guava 23.x to 25.x
-
#116: Suppport simple deserialization of
Cache -
#117:
ImmutableRangeSetfails to deserialize without explicit deserializer
-
#140:
HibernateModule.REPLACE_PERSISTENT_COLLECTIONSnot working whenFetchType.EAGER
- #37: Fix class path scaning on each deserialization
-
#117: PCollections module info (
module-info.class) incorrect
- #216: Disable when running in native-image
-
#209: Add guice7 (
jakarta.inject) module
-
#219: Using
jackson-module-jakarta-xmlbind-annotations2.15.2 fails in OSGi Environment with JAXB 4
...