Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Jettison and Jackson in JBoss

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?

like image 479
Koekiebox Avatar asked Aug 14 '12 15:08

Koekiebox


People also ask

What is the use of Jackson dependency?

Jackson is a very popular and efficient java based library to serialize or map java objects to JSON and vice versa.

Does RESTEasy use Jackson?

Annotate the method with @Produces("application/json") . RESTEasy will use Jackson provider to handle the JSON conversion automatically.

What is RESTEasy Jackson provider?

RESTEasy. Jackson, RESTEasy. RESTEasy is JBOSS provided implementation of JAX-RS specification for building RESTful Web Services and RESTful Java applications.


2 Answers

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.

like image 88
jacktrades Avatar answered Oct 21 '22 07:10

jacktrades


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.

like image 1
feniix Avatar answered Oct 21 '22 06:10

feniix