Jackson 2.0: Features
(note: bigger document on major 1.x -> 2.x changes are at JacksonRelease20 main page)
Version 2.0 is in development (as of January 2012); following completion of 1.9 release.
Aside from big packaging, naming and structural changes (refer to JacksonRelease20 for more), big areas of improvement include:
- Even more unification of deserialization/serialization features, interfaces.
Features/fixes/improvements, major
JACKSON-107: Support for Object Identity: support cyclic Object graphs, handle multiple references to same object without duplication
JACKSON-437: Allow setting of property with "type id" value set with @JsonTypeInfo (custom type id properties), when enabled with @JsonTypeInfo.visible = true
JACKSON-469: Support builder pattern for deserialization, with @JsonDeserialize.builder, @JsonPOJOBuilder
JACKSON-608: Allow use of JacksonJsonViews for deserialization too
Features/fixes/improvements, medium
JACKSON-669: Add @JsonUnwrapped.prefix, .suffix to allow distinguishing names of unwrapper properties
JACKSON-695: Add 'isEmpty(value)' in JsonSerializer to allow customizing handling of serialization of empty values
JACKSON-749: Make @JsonValue to work for Enum deserialization (in addition to serialization)
JACKSON-754: Add @JacksonAnnotationsInside meta-annotation: used for creating "annotation bundles"
note: Can also override AnnotationIntrospector.isAnnotationBundle() to use any other marker for bundles.
JACKSON-770: Simplify method naming for JsonNode, drop unnecessary 'get' prefix from methods like 'getTextValue()' (becomes 'textValue()')
JACKSON-805: Added SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED which allows interoperability with Jettison/Badgerfish, by "unwrapping" Lists/arrays that have exactly one element.
Features/fixes/improvements, minor
JACKSON-707: Add 'JsonNode.deepCopy()', to create safe deep copies of ObjectNodes, ArrayNodes.
JACKSON-752: Add @JsonInclude, to replace @JsonSerialize.include
JACKSON-764: Allow specifying "root name" to use for root wrapping via ObjectReader, ObjectWriter.
JACKSON-772: Add 'JsonNode.withArray()' to use for traversing Array nodes.
JACKSON-787: Allow @JsonIgnoreProperties to be used for properties, not just classes
JACKSON-800: Add Module.SetupContext#addDeserializationProblemHandler
JACKSON-810: Allow unknown Enum values with DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL
Features for Modules
Since 2.0 is even more modular -- only 3 of components (core, annotations, databind) are considered core components -- many improvements are through these extension. Here are links to some of these improvements:
JAXB-Annotations-2: Add support for @XmlID, @XmlIDREF.
