-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
JacksonRelease1.7
(code name: Infinity-and-Beyond)
Version 1.7 was released January 6th, 2011, 4 months after JacksonRelease16
Major area to improve is the extensibility by 3rd party providers; by:
- Modularity improvements, allowing extensions to attach modularly (and without sub-classing), co-exist peacefully
- Increase ways in which external code can cleanly customize and extend core functionality: for example, with addition of "bean serializer/deserializer modifiers" that can change the way Bean (POJO) serializers and deserializers are constructure and configured
- Increase configurability of existing components; for example by allowing contextual serializers and deserializers; contextual meaning that instances can be configured based on context in which they are used (property being serialized or deserialized).
1.7 is technically a "minor" update over JacksonRelease16, since it will be backwards compatible (hence not a "major" version bump), but will introduce new features (hence not a "patch" release). External API should remain compatible, although internal (non-public) interfaces may be changed. However, compared to most other 1.x updates, there are more changes to "semi-private" interfaces; this may affect some advanced use cases.
Following is the list of functionality that has been implemented for this release.
- http://jira.codehaus.org/browse/JACKSON-280: Allow use of @JsonTypeInfo for properties (fields, methods)
- http://jira.codehaus.org/browse/JACKSON-297: Add JacksonFeatureModules to better define interface for 3rd party plug-in libraries
- Related:
- http://jira.codehaus.org/browse/JACKSON-369: Allow registering custom deserializers without extending SerializerFactory (or using CustomSerializerFactory)
- http://jira.codehaus.org/browse/JACKSON-421: Add ability to register multiple sets of serializers without extending SerializerFactory
- http://jira.codehaus.org/browse/JACKSON-312: Add ability to do per-serialization, JacksonFeatureJsonFilter of fields (using @JsonFilter, ObjectMapper.filteredWriter())
- http://jira.codehaus.org/browse/JACKSON-385: Support JacksonFeatureContextualHandlers
- http://jira.codehaus.org/browse/JACKSON-440: add a mechanism for post-processing ("enhancing") serializers, deserializers using pluggable handlers (BeanSerializerModifier, BeanDeserializerModifier) that can be registered using module interface (they plug-in with BeanSerializerFactory, BeanDeserializerFactory, respectively).
- http://jira.codehaus.org/browse/JACKSON-163: Support "wrapped" output (for JAXB compatibility mostly) (NOTE: only serialization support; deserialization can be added if/when needed)
- http://jira.codehaus.org/browse/JACKSON-345: Use SerializedString for BeanSerializer to improve serialization performance
- http://jira.codehaus.org/browse/JACKSON-351: Add @JsonRawValue for injecting "raw" text into JSON output
- http://jira.codehaus.org/browse/JACKSON-401: ObjectMapper, JsonGenerator: Allow more control over flush()ing of underlying stream
- http://jira.codehaus.org/browse/JACKSON-407: Allow disabling wrapping of runtime exceptions during serialization, deserialization.
- http://jira.codehaus.org/browse/JACKSON-412: Add DeserializationConfig.Feature.FAIL_ON_NUMBERS_FOR_ENUMS to define whether it is ok to map JSON integer to enum values with matching ordinal() (see JacksonFeaturesDeserialization)
- http://jira.codehaus.org/browse/JACKSON-414: Add getValueAsBoolean() to JsonNode and JsonParser
- http://jira.codehaus.org/browse/JACKSON-419: Add java.util.Locale deserializer (serialize as JSON String, deserialize)
- http://jira.codehaus.org/browse/JACKSON-420: Add DeserializationConfig.Feature.FAIL_ON_NULL_FOR_PRIMITIVES to define whether it is ok to map JSON null to default primitive value (see JacksonFeaturesDeserialization)
- http://jira.codehaus.org/browse/JACKSON-429: Add @JsonIgnoreType to allow ignoring any and all properties of specified type; useful for excluding well-known proxy/facade/handler types
- http://jira.codehaus.org/browse/JACKSON-432: Add ObjectMapper.enableDefaultTypingAsProperty() to allow specifying inclusion type As.PROPERTY and property name to use
Due to additional Module API and other extensibility features, it is now possible to "externalize" development of support for third-party data types. As a result, following feature requests are planned to be tackled via separate sub-projects (see JacksonModuleProjects page for details):
- http://jira.codehaus.org/browse/JACKSON-276: Support for lazy-loaded Hibernate types; see JacksonModuleHibernate
- http://jira.codehaus.org/browse/JACKSON-317: Support for Guava (FKA Google Collections) datatypes, see JacksonModuleGuava
- http://jira.codehaus.org/browse/JACKSON-394: Implement ObjectMapper subtype (along with other needed pieces, JsonFactory, parser, generator) that allows serializing POJOs as xml, deserializing POJOs from xml using Stax sources (aka JacksonFeatureMiniJAXB)
Since implementation of modules (and other major extensions) is dependant on 1.7 release itself, plan is that these sub-projects can rapidly complete initial development and release first public versions shortly after 1.7 itself is released.
Some significant features were considered for inclusion but were postponed for later versions. This includes:
- http://jira.codehaus.org/browse/JACKSON-132: Allow unwrapping (flattening) of properties of an Object
- http://jira.codehaus.org/browse/JACKSON-275: Support multi-argument setters (to allow co-constraints)
- http://jira.codehaus.org/browse/JACKSON-279: Retain timezone information during serialization, deserialization
- http://jira.codehaus.org/browse/JACKSON-406: Allow injection of values during deserialization.
CategoryJackson