Jackson Documentation
General
Jackson Tutorial: the best place to start; covers basic processing approaches and covers common usage patterns.
Jackson FAQ covers many common questions regarding typical usage.
Jackson JavaDocs has extensive and detailed coverage of all the features: what is available, where, how. But you do need to know where to look.
Jackson User Group is a site/group/social network dedicated to all things Jackson, for sharing knowledge about how to use Jackson efficiently.
Using Jackson with Smile (binary JSON) format: JacksonForSmile
Features, general
To learn more about how to configure Jackson, check out:
Jackson annotation guide (related: support for JAXB annotations)
- Adding custom handlers:
Usage Patterns
This mini-series from Cowtalk is useful for seeing bigger picture.
How to work with:
Open Content (extensible, loose or partial content definitions)
Polymorphic Types (by Programmer Bruce)
By functionality:
Polymorphic type handling: http://programmerbruce.blogspot.com/2011/05/deserialize-json-with-jackson-into.html
Abstract type materialization: Mr Bean, aka "abstract type materialization" (also, see "Materialized Beans" page)
By (alternate) data format:
XML: http://www.cowtowncoder.com/blog/archives/2012/03/entry_467.html } Jackson 2.0: also works with XML!
- CSV: (to be added)
Features by Release
New functionality is being introduced with new releases, and sometimes it is useful to know what is the minimum version that has specific set of functionality you need; or to evaluate whether upgrade to a new version would make sense. To help with this, there are separate release pages for recent (and sometimes upcoming) Jackson releases:
2.1 Features (Oct 2012)
2.0 Features (Feb 2012).
1.9 Features (Oct 2011).
1.8 Features (Apr 2011).
1.7 Features (Jan 2011). Highlights:
Module interface (and multiple module projects!), Dynamic filters, Contextual (de)serializers
1.6 Features (Sep 2010). Highlights:
mr. Bean, Smile ("binary JSON") format, Bi-directional references (parent/child), updateValue (not just create)
1.5 Features (Mar 2010). Highlights:
1.4 Features (Dec 2009). Highlights:
1.3 Features (Oct 2009)
1.2 Features (Aug 2009). Highlights:
Mix-in Annotations, Use any constructor (not just default)
1.1 Features (Jun 2009). Highlights:
Support for JAXB annotations, JSON Schema generation, Support fields too (not just methods)
1.0 Features (May 2009). Hightlights:
3 fundamental operating models: Full data binding, JSON Tree model, Streaming API
HOW-TOs, samples
Here is some sample code, contributed by Jackson users on mailing lists. It is not intended to define official or canonical way of doing things, but showing possible alternatives -- and if you do end up finding better ways, or have incremental improvement suggestions, please let us know so we can update samples!
How-to Ignore Unknown properties in JSON content?
- Basic:
Dyna-beans? (extensible beans)
- Intermediate:
"Jackson serialization narrowed" -- how to exclude informations when serializing objects using JSON views, @JsonIgnore, mix-in annotations
- Advanced:
Jackson Type Proxy for extremely dynamic generation of types
Quoting JSON String characters -- in case your clients can not handle all legal Unicode characters.
Custom JSON View implementation (contributed by Andrei V)
Jackson to rescue: how to handle one-to-many fields from ORM (parent / child)
Prevent cross-site scripting when using JSON objects...: How to add custom String serializer to add escaping, quoting, using latest (1.7) features.
Term Glossary
Term Glossary contains list of commonly referred internal terms, such as names of often-used core classes.
Best Practices
Related extension projects
Beyond core Jackson project and its deliverables, there are related external projects that can solve problems with third party libaries and data types, and even non-Java JVM languages or non-JSON data formats:
Jackson Modules offer pluggable extensions for third-party datatypes or non-Java JVM languages.
Jackson outside of JSON page lists projects that aim to support data formats other than JSON, but using Jackson data binding functionality.
Forward-looking
TODO list
Known Issues (higher level ones: for bugs and feature requests, check out Jackson Jira at Codehaus)
External docs
General:
Batchfb User Guide + Basic Jackson Tutorial (nice tutorial right after explaining basics of the Lib itself)
Jackson with frameworks:
- iBeans (Mule):
- Play framework:
- Restlet:
- Spring:
- Ext-JS (plus others, Spring MVC, Hibernate, ...)
Multiple useful articles at In the Folds, including:
Jackson with non-Java JVM languages:
- Groovy:
Scala: see JacksonModuleScala
Performance:
Performance comparison of Protocol Buffers, JSON et al formats, libs.
Basic JSON parsing performance in Java (Cowtowncoder.com)
JSON data binding performance with 3 JSON data binding libs: Jackson, Google-gson, Json-lib (Cowtowncoder.com)
- On Android:
