-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Jackson Release 2.17
Jackson Version 2.17 was released on March 12, 2024. One release candidate (2.17.0-rc1) was released prior to final 2.17.0.
This wiki page gives a list of links to all changes (with brief descriptions) that are included, as well as about original plans for bigger changes (and in some cases changes to plans, postponing).
Branch is open for patch releases: it is likely that at most one more patch may be released before branch is closed.
A skeletal extension, jackson-jr-extension-javatime
was added with initial support for just java.time.LocalDateTime
:
the main goal is to have a place to add support for new types via contributions.
To use it, just register extension and support is enabled:
JSON json = JSON.builder()
.register(new JacksonJrJavaTimeExtension())
.build();
String jsonString = json.asString(new ValueWithTime());
Same as Jackson 2.16, SDK 26
Same as Jackson 2.16
In 2.17, JSON Strings like "07" (leading zeroes) will no longer be recognized as coercible numbers for things like Enum
indexes.
-
#437: Adds
DeserializationFeature.FAIL_ON_UNEXPECTED_VIEW_PROPERTIES
, enabling of which starts failing known properties that are not part of the active view
Was Not Started Yet (same old story...) during 2.17 development.
-
#242: Allow
@JsonAnySetter
onElementType.PARAMETER
(for use on constructor parameters)
-
#507: Add
JsonWriteFeature.ESCAPE_FORWARD_SLASHES
to allow escaping of '/' for String values -
#1117: Change default
RecylerPool
implementation tonewLockFreePool
(fromthreadLocalPool
) -
#1137: Improve detection of "is a NaN" to only consider explicit cases, not
double
overflow/underflow -
#1145:
JsonPointer.appendProperty(String)
does not escape the property name -
#1149: Add
JsonParser.getNumberTypeFP()
-
#1157: Use fast parser (FDP) for large
BigDecimal
s (500+ chars) -
#1169:
ArrayIndexOutOfBoundsException
for specific invalid content, with Reader-based parser -
#1173:
JsonLocation
consistently off by one character for many invalid JSON parsing cases -
#1179: Allow configuring
DefaultPrettyPrinter
separators for empty Arrays and Objects -
#1186:
BufferRecycler
should avoid setting replacement if one already returned, bigger -
#1195: Use
BufferRecycler
provided by output (OutputStream
,Writer
) object if available -
#1202: Add
RecyclerPool.clear()
method for dropping all recycled instances - #1203: Faster division by 1000
- #1207: JsonFactory.setStreamReadConstraints(StreamReadConstraints) fails to update "maxNameLength" for symbol tables
- #1217: Optimize char comparison using bitwise OR
- #1218: Simplify Unicode surrogate pair conversion for generation
-
#437: Support throwing
MismatchedInputException
when deserializing properties that are not part of the view -
#736:
MapperFeature.REQUIRE_SETTERS_FOR_GETTERS
has no effect -
#2543: Introspection includes delegating ctor's only parameter as a property in
BeanDescription
-
#4160: Deprecate
DefaultTyping.EVERYTHING
in2.x
and remove in3.0
-
#4194: Add
JsonNodeFeature.FAIL_ON_NAN_TO_BIG_DECIMAL_COERCION
option to fail on attempting to coerceNaN
intoBigDecimal
-
#4205: Consider types in
sun.*
package(s) to be JDK (platform) types for purposes of handling -
#4209: Make
BeanDeserializerModifier
/BeanSerializerModifier
implementjava.io.Serializable
-
#4214:
EnumSet
deserialization does not work when we activate default typing inObjectMapper
-
#4248:
ThrowableDeserializer
does not handlenull
well forcause
-
#4250: Add input validation for
NumberDeserializers
deserializers for "stringified" FP numbers -
#4262: Improve handling of
null
insertion failure forTreeSet
-
#4263: Change
ObjectArrayDeserializer
to use "generic" type parameter (java.lang.Object
) to remove co-variant return type -
#4299: Some
Collection
andMap
fallbacks don't work in GraalVM native image -
#4327:
@JsonAlias
not respected by polymorphic deduction -
#4337:
AtomicReference
serializer does not support@JsonSerialize(contentConverter=...)
-
#4364:
@JsonProperty
and equivalents should merge withAnnotationIntrospectorPair
-
#4394: Better Base64 support for
java.util.UUID
s - #4403: Deserialization of unknown value for enums does not yield default enum value
-
#4416: Deprecate
JsonNode.asText(String)
-
#449:
IndexOutOfBoundsException
inJacksonAvroParserImpl
for invalid input
-
#451:
IndexOutOfBoundsException
inCBORParser
for invalid input -
#458: Unexpected NullPointerException in
CBORParser
-
#464: Unexpected
ArrayIndexOutOfBoundsException
inCBORParser
for corrupt String value
-
#45: Allow skipping ending line break (
CsvGenerator.Feature.WRITE_LINEFEED_AFTER_LAST_ROW
)
-
#251: Unable to deserialize Object with unknown
Timestamp
field -
#417:
IonReader
classes contain assert statement which could throw unexpectedAssertionError
-
#420:
IndexOutOfBoundsException
thrown byIonReader
implementations are not handled -
#424:
IonReader
throwsNullPointerException
for unchecked invalid data -
#428:
IonParser.getIntValue()
fails or does not handle value overflow checks -
#432: More methods from
IonReader
could throw an unexpectedAssertionError
-
#434: Unexpected
NullPointerException
thrown fromIonParser::getNumberType()
-
#437:
IonReader.next()
throws NPEs for some invalid content -
#469: IonReader.newBytes() throwing
NegativeArraySizeException
-
#471:
IonReader
throwsAssertionError
for Timestamp value -
#473:
IonReader.next()
throwsArrayIndexOutOfBoundsException
for some corrupt content -
#473: Upgrade
ion-java
to 1.11.2 and remove handling of exceptions that are no longer leaked
-
#462:
ProtobufParser.currentName()
returns wrong value at root level
-
#426:
SmileParser
throws unexpected IOOBE for corrupt content
-
#324: Support use of
xsi:type
for polymorphic serialization (ToXmlGenerator.Feature.AUTO_DETECT_XSI_TYPE
) -
#618:
ArrayIndexOutOfBoundsException
thrown for invalid ending XML string when using JDK default Stax XML parser -
#631: Add
XmlMapper.createGenerator(XMLStreamWriter)
andXmlMapper.createParser(XMLStreamReader)
overloads - #634: Support use of xsi:type for polymorphic deserialization (FromXmlParser.Feature.AUTO_DETECT_XSI_TYPE)
-
#637:
JacksonXmlAnnotationIntrospector.findNamespace()
should properly merge namespace information - #643: XML serialization of floating-point infinity is incompatible with JAXB and XML Schema
-
#454: Unexpected
NumberFormatException
inYAMLParser
-
#456: Support max Read/Write nesting depth limits (
StreamReadConstraints
/StreamWriteConstraints
) for YAML -
#465: YAML: consider starting
#
and ending:
as quotable characters
-
#274: Add 1-based
Month[De]serializer
enabled withJavaTimeFeature.ONE_BASED_MONTHS
option
-
#294:
Optional
deserialization, serialization ignorecontentConverter
-
#118: Support
@JsonFormat(shape=STRING)
onRange<T>
-
#124: Some deserializers throw unexpected
NullPointerException
when handling invalid input -
#136: Fix for failing Guava
Optional
test -
#138:
GuavaCollectionDeserializer
still throws NPE in some circumstances -
#140:
Cache
deserialization fails with NPE fornull
valued entries -
#142:
RangeSet
deserializer fails for contentnull
s with NPE
- #727: Fixed overriding findCreatorAnnotation instead of hasCreatorAnnotation
- #732: SequenceSerializer removed
- #738: JacksonInject is now preferred over the default argument (fixes #722)
- #740: Reduce conversion cache from Executable to KFunction. This will reduce memory usage efficiency and total memory consumption, but may result in a minor performance degradation in use cases where a large number of factory functions are used as JsonCreator.
-
#741: Changed to allow KotlinFeature to be set in the function that registers a KotlinModule. The
jacksonObjectMapper {}
andregisterKotlinModule {}
lambdas allow configuration for KotlinModule - #742: Minor performance improvements to NullToEmptyCollection/Map
- #743: The handling of deserialization using vararg arguments has been improved to allow deserialization even when the input to the vararg argument is undefined. In addition, vararg arguments are now reported as non-required
- #744: Functions that were already marked as deprecated, such as the primary constructor in KotlinModule and some functions in Builder, are scheduled for removal in 2.18 and their DeprecationLevel has been raised to Error. Hidden constructors that were left in for compatibility are also marked for removal. This PR also adds a hidden no-argument constructor to facilitate initialization from reflection.
- #745: Modified isKotlinClass determination method
- #746: The KotlinModule#serialVersionUID is set to private
- #747: Improved performance related to KotlinModule initialization and setupModule. With this change, the KotlinModule initialization error when using Kotlin 1.4 or lower has been eliminated
-
#751:
KotlinModule#useKotlinPropertyNameForGetter
property was deprecated because it differed from the name of theKotlinFeature
- #755: Changes in constructor invocation and argument management. This change degrades performance in cases where the constructor is called without default arguments, but improves performance in other cases
-
#758: Deprecated
SingletonSupport
and related properties to be consistent withKotlinFeature.SingletonSupport
- #760: Caching is now applied to the entire parameter parsing process on Kotlin
- #768: Added value class deserialization support
- #501: make Scala3 enum support part of DefaultScalaModule - and no longer require users to load a separate module
- #666: Support deserialization of TreeSeqMap
No changes to JAX-RS or Jakarta-RS providers.
-
#7: Support deserialization of
int[]
- #25: Add support for single-int Constructors
- #51: Duplicate key detection does not work for (simple) Trees
-
#78: Deserializes "null" to "0.0" for
java.lang.Double
(wrapper) -
#93: Skip serialization of
groovy.lang.MetaClass
values to avoidStackOverflowError
- #94: Support for serializing Java Records
-
#100: Add support for
java.time
(Java 8 date/time) types -
#112:
overrideStandardValueWriter
only applied to firstjava.nio.file.Path
valued field of bean -
#116: Add read/write support for
java.nio.file.Path
-
#131: Add mechanism for
JacksonJrExtension
s to access state ofJSON.Feature
s