-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Jackson Release 2.11
Version 2.10 was released on April 26, 2020.
This wiki page gives a list of links to all changes; there should be a blog post in near future to cover some of the changes in more detail.
Branch is open for new minor versions
No changes to minimum JDK baselines for use since 2.10
JDK 8 is required to build all components, however, as module info inclusion plug-in requires it (note: publishing to Maven Central also requires JDK 8), but runtime environment of JDK/JVM jacis needed with exception of:
-
jackson-annotations,jackson-core,jackson-jronly require JDK/JVM 6 - Kotlin, Scala and Java 8 modules require JDK/JVM 8 or higher
- Default serialization ordering now considers
@JsonProperty(index = )(seedatabind#2555below) -
Avroformat backend now identifies as capable of embedding binary data: will change schema type indicated forbyte[],java.util.UUID(seedataformats-binary/avro#179below) - Timezone offset in default
java.util.Date,java.util.Calendarserialization will now include colon (like+00:00) by default (seedatabind#2643below)
- New datatype module --
jackson-datatype-joda-moneyfor Joda Money datatypes- Added as part of multi-project Jackson Misc Datatypes (https://github.com/FasterXML/jackson-datatypes-misc) repo
- Contributed by Iurii Ignatko
-
jackson-jrnow has one more component,jr-annotation-support(see issuejackson-jr#32below)
Need to properly serialize/deserialize UUIDs in Avro was determined late, but will also affect Protobuf.
Beyond more compact binary representation, generating usable schema, it would be nice to also allow Shape
overrides in case textual representation is needed.
New MapperFeature, BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES added (see #2587): if enabled, will impose limits on allowed base types for:
- Legacy Default Typing enabling methods (
ObjectMapper.enableDefaultTyping()), which, while deprecated may still be in use - Polymorphic deserialization using
@JsonTypeInfowith class name as is, without explicitly configuredPolymorphicTypeValidator
This is basically a one-line addition that can force safe defaults, similar to ones that Jackson 3.0 will have by default: overridable as needed, but strict(er) by default.
With new jr-annotation-support component (JacksonAnnotationExtension), it is now possible use some of core Jackson annotations for changing basic property inclusion/ignoral and naming rules.
See jackson-jr#32 below for details.
Databind:
-
@JsonAliasworks for Enums (2352) -
@JsonSerialize(keyUsing)and@JsonDeserialize(keyUsing)work on (Map) key class (#2503)
- #504: Add a String Array write method in the Streaming API
-
#565: Synchronize variants of
JsonGenerator#writeNumberFieldwithJsonGenerator#writeNumber - #587: Add JsonGenerator#writeNumber(char[], int, int) method
-
#606: Do not clear aggregated contents of
TextBufferwhenreleaseBuffers()called -
#609:
FilteringGeneratorDelegatedoes not handlewriteString(Reader, int) - #611: Optionally allow leading decimal in float tokens
- #953: i-I case conversion problem in Turkish locale with case-insensitive deserialization
-
#962:
@JsonInjectfails on trying to find deserializer even if inject-only -
#1983: Polymorphic deserialization should handle case-insensitive Type Id property name if
MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIESis enabled -
#2049:
TreeTraversingParserandUTF8StreamJsonParsercreate contexts differently -
#2352: Support use of
@JsonAliasfor enum values -
#2365:
declaringClassof "enum-as-POJO" not removed forObjectMapperwith a naming strategy -
#2480: Fix
JavaType.isEnumType()to support sub-classes -
#2487:
BeanDeserializerBuilderProtected Factory Method for Extension -
#2503: Support
@JsonSerialize(keyUsing)and@JsonDeserialize(keyUsing)on Key class -
#2511: Add
SerializationFeature.WRITE_SELF_REFERENCES_AS_NULL -
#2515:
ObjectMapper.registerSubtypes(NamedType...)doesn't allow to register the same POJO for two different type ids -
#2522:
DeserializationContext.handleMissingInstantiator()throwsMismatchedInputExceptionfor non-static inner classes -
#2525: Incorrect
JsonStreamContextforTokenBufferandTreeTraversingParser -
#2527: Add
AnnotationIntrospector.findRenameByField()to support Kotlin's "is-getter" naming convention -
#2555: Use
@JsonProperty(index)for sorting properties on serialization -
#2565: Java 8
Optionalnot working with@JsonUnwrappedon unwrappable type -
#2587: Add
MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPESto allow blocking use of unsafe base type for polymorphic deserialization -
#2589:
DOMDeserializer: setExpandEntityReferences(false) may not prevent external entity expansion in all cases -
#2592:
ObjectMapper.setSerializationInclusion()is ignored forJsonAnyGetter -
#2608:
ValueInstantiationExceptionwhen deserializing using a builder andUNWRAP_SINGLE_VALUE_ARRAYS - #2636: ObjectReader readValue lacks Class argument
-
#2643: Change default textual serialization of
java.util.Date/Calendarto include colon in timezone offset -
#2647: Add
ObjectMapper.createParser()andcreateGenerator()methods -
#2657: Allow serialization of
Propertieswith non-String values -
#2663: Add new factory method for creating custom
EnumValuesto pass to `EnumDeserializer -
#2693: Add convenience methods for creating
List,MapvaluedObjectReaders (ObjectMapper.readerForListOf())
-
#179: Add
AvroGenerator.canWriteBinaryNatively()to support binary writes, fixjava.util.UUIDrepresentation
-
#7: Add
CsvParser.Feature.EMPTY_STRING_AS_NULLto allow coercing empty Strings intonullvalues -
#115: JsonProperty index is not honored by CsvSchema builder
(actually fixed by
databind#2555) -
#174:
CsvParser.Feature.SKIP_EMPTY_LINESresults in a mapping error -
#191:
ArrayIndexOutOfBoundsExceptionwhen skipping empty lines, comments - #195: Add schema creating csv schema with View
-
#192: Allow
IonObjectMapperwith class name annotation introspector to deserialize generic subtypes
-
#180: YAMLGenerator serializes string with special chars unquoted when using
MINIMIZE_QUOTESmode
-
#58: Should not parse
LocalDates from number (timestamp), or at least should have an option preventing -
#128: Timestamp keys from
ZonedDateTime -
#138: Prevent deserialization of "" as
nullforDuration,Instant,LocalTime,OffsetTimeandYearMonthin "strict" (non-lenient) mode -
#148: Allow strict
LocalDateparsing - Add explicit
ZoneIdserializer to force use ofZoneIdas Type Id, and not inaccessible subtype (ZoneRegion): this to avoid JDK9+ Module Access problem
- #104: Deserializing Interval discards timezone information
-
#13: Support for
JsonPatchandJsonMergePatchdefined in JSON-P 1.1
-
#284: Use
AnnotationIntrospector.findRenameByField()to support "is properties" -
#321:
MissingKotlinParameterExceptionshould extendMismatchedInputException
- #87: Support for default parameter values