Reputation: 2973
I recently started developing rest apis and stumbled on these terms - jetty, jackson & jersey. I successfully developed rest apis using jersey on plain eclipse.
I believe jackson is to facilitate de-serialization and serialization of xml/java objects. But what it is - is it just a collection of jar files? - If yes, can/should I use it alongside if I am already using jersey framework (if my apis deal with xmls)?
Likewise, what ie Jetty - I downloaded it and saw whole lot of folders and files - and they were not just collection of jars! If it is a framework, can I use it on top of jersey? If yes, it looks pretty heavy - I thought it might just be few jars to deal with html content. But looks like there is lot more to it.
Are these three things meant to be used together if my apis deal with all media types? If yes, how and what is the best approach?
Thanks.
Upvotes: 0
Views: 1152
Reputation: 67360
Jetty is a servlet container.
Jersey is a library that lets you develop restful apis in Java.
Jackson is a java library for JSON processing.
Jetty can be used to "serve" servlets and jsps. Jersey can be used to build your rest resources but it needs to be run on a servlet container. Without Jersey you'd be dealing with servlets directly which would be way lower level than you'd want. And Jackson can be used to serialize your java objects to and from JSON.
Jackson may play more roles than that for Jersey, I'm not sure. But you can click on the links I've provided to learn more.
Upvotes: 9