-
Notifications
You must be signed in to change notification settings - Fork 114
Presentation Jackson 2.0
Jackson 2.0 is the first Major release after official 1.x versions. As the major version bump indicates, 2.0 is the first official release that is NOT fully backwards compatible.
This presentation gives an overview of changes that occured between versions 1.9 and 2.0.
Although progression from 1.9 to 2.0 seems natural from "increasing numbers" perspective, we did actually seriously consider going to 1.10 and possibly more versions, with the usual rules of backwards compatibility.
But after so many minor releases, Jackson had accumulated some technical debt, in form of deprecated methods, as well as many non-intuitive naming choices and non-optimal packaging decisions. Further, external developments like awesomeness of GitHub and steady improvement of Maven build system were suggesting that we might want to improve building and release management aspects as well; changes that would cause some backwards-compatibility issues of their own.
None of the issues alone would have been sufficient to justify break from expected compatibility (in our opinion); but taken as whole, it seemed like time would be ripe to make a clean break, to pay down most of the technical debt.
The rough summary of clean-up changes that started Jackson 2.0 development is:
- Moving code, projects to GitHub
- Existing Jackson 1,x project remains at Codehaus; 2.x projects created at GitHub
- Existing 6 Jackson 1.x components refactored as 7 Github projects, jars:
- 3 Core Jackson projects:
jackson-core
Streaming API,jackson-databind
(http://wiki.fasterxml.com/JacksonDataBinding) andjackson-annotations
(core annotations; used to be bundled with "core", in 1.x) - 4 module projects: Smile format, [Mr Bean] (https://github.com/FasterXML/jackson-module-mrbean), JAXB Annotations, JAX-RS JSON Provider
- Big benefits from forkability, merge/pull of contributions
- Change build from Ant to Maven
- Simplifies releases significantly; can deploy to Sonatype OSS Maven repository (which syncs to central Maven repo)
- Remove ALL methods, types, annotations that were deprecated in 1.9!
- Rename/move
- Rename Java packages, mostly to allow 1.x and 2.0 to co-exist; in some cases to make more intuitive
- Rename a small number of misnamed classes (for example
DeserializationConfig.Feature
asDeserializationFeature
) - Move couple of classes to clean up package structure (split "too big" packages)
Although Jackson 1.x had introduced some non-JSON backends (notably Smile and XML), one significant area for improvement for 2.0 API was to support even wider range of alternate data formats.
Here is a high-level overview of all data formats that Jackson 2.0 supports, either directly or via extension modules
- JSON -- the baseline format that Jackson supports out-of-the-box
- Smile (since 1.6) -- 100% feature parity, compatibility with JSON at Streaming API level
- BSON (since ~1.7): support for BSON, JSON-like data format used by MongoDB
- external project (not under FasterXML), implemented by Michel Kramer (with help from Jackson team)
- XML (since 1.8)
- CSV (1.9 (preliminary), 2.0 (full)
- YAML (since 2.0): uses SnakeYAML library for parsing.