What is the fundmental difference between using RestEasy JSON Provider Jettison (Badgerfish mapping) over Jackson?
What is is pros and cons of using the one over the other?
Jackson is a very popular and efficient java based library to serialize or map java objects to JSON and vice versa.
Annotate the method with @Produces("application/json") . RESTEasy will use Jackson provider to handle the JSON conversion automatically.
RESTEasy. Jackson, RESTEasy. RESTEasy is JBOSS provided implementation of JAX-RS specification for building RESTful Web Services and RESTful Java applications.
Jettison is old.
Jackson is arguably the standard Java Library for processing JSON. Jackson is included in Glassfish.
Also some developers has warned me to stay off Badgerfish.
You can implement Jackson in Resteasy, see here.
http://wiki.fasterxml.com/JacksonFAQ#Which_mappings_.28Badgerfish.2C_natural.2C_....29_does_Jackson_implement.3F
Which mappings (Badgerfish, natural, ...) does Jackson implement?
None. Jackson is "100% JSON" and does not try to imitate or emulate XML. Property name mapping is based on standard Java Bean naming convention (although can be overridden using annotations or custom naming strategy).
There are some support compatibility features -- such as ability to optionally use JAXB annotations -- but fundamentally Jackson is a pure JSON/Java data mapper and tries to minimize impedance between JSON and Java data models.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With