-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
JacksonRelease1.4
JacksonHome 1.4 was released on December 19th 2009.
It is classified as a "minor" update over JacksonRelease13, since it will be fully backwards compatible (hence not a "major" version bump), but will introduce new features (hence not a "patch" release).
Main focus of this release is on improving serialization side, to allow users to configure details of serialization. Secondary focus is on interoperability, trying to ensure Jackson works well with as many other libraries, platforms and JVM languages as possible (as per user reports).
Following is the list of functionality that has been implemented for this release.
- http://jira.codehaus.org/browse/JACKSON-138: Add support for JacksonJsonViews (using @JsonView annotations)
- Additional work was done to allow more customized handling, by sub-classing BeanSerializerFactory (see JacksonJsonViews for details)
- http://jira.codehaus.org/browse/JACKSON-77 Add @JsonIgnoreProperties class annotation that allows ignoring properties for serialization and deserialization, such that
- JsonIgnoreProperties.value can be used to enumerate names of properties to explicitly ignore (not write out when serializing; ignore if seen during deeserialization)
- JsonIgnoreProperties.ignoreUnknown can be used to specify that any unrecognized properties are to be skipped (without exception) when deserializing instances of annotated class (has no effect on serialization)
- Related change, http://jira.codehaus.org/browse/JACKSON-89 will implicitly add @JsonIgnore'd Setter/Creator properties as properties to quietly ignore during deserialization (if no explicit handling defined)
- http://jira.codehaus.org/browse/JACKSON-90 Add @JsonPropertyOrder class annotation for specifying serialization order of properties.
- @JsonPropertyOrder.value can be used to explicitly specify first properties to serialize; this can be partial ordering, and properties other than listed will be serialized after properties listed.
- @JsonPropertyOrder.alphabetic can be used to specify that properties that are not explicitly specified should be ordered alphabetically
- Related change, http://jira.codehaus.org/browse/JACKSON-170 adds further implicit ordering such that in absence of explicit ordering, Creator properties (parameters to constructors and factory methods) are to be ordered before other properties (this also has precedence over alphabetic ordering)
- http://jira.codehaus.org/browse/JACKSON-192 Add delegate implementations for JsonParser and JsonGenerator (org.codehaus.jackson.util.JsonParserDelegate / JsonGeneratorDelegate) for easier overriding of low-level read/write functionality. Can be used, for example, for filtering out specific fields (override JsonParser.nextToken() to skip select fields with values).
- http://jira.codehaus.org/browse/JACKSON-201 Handle "empty beans" (ones with no getters) without exceptions if there are recognized class annotations; or if SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS is enabled.
Some features specifically target interoperability (make Jackson easier to integrate with other packages, platforms):
- http://jira.codehaus.org/browse/JACKSON-38 Add converters for DOM trees (to/from JSON Strings) for improved interoperability.
- http://jira.codehaus.org/browse/JACKSON-161 Add basic converters for http://joda-time.sourceforge.net/ package (specifically DateTime class -- more can be added later on)
- http://jira.codehaus.org/browse/JACKSON-208 Add JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS that allows reading "JSON" content that has unquoted control characters (tabs, linefeeds) in Strings (including field names).
- '''NOTE''': This is a JacksonFeaturesNonStandard feature, intended only to be used when handling non-valid "JSON" content: use only if you must.
- http://jira.codehaus.org/browse/JACKSON-216 Add support for JAXB annotation XmlElement.type for defining concrete class to use for deserialization.
Following features were initially planned to be included but were deferred for subsequent releases:
- http://jira.codehaus.org/browse/JACKSON-175: Create efficient TokenBuffer class for storing JSON document fragments; change ObjectMapper.convertValue() to use it. Also needed for future Polymorphic Deserialization feature.
CategoryJackson