Question

I'd like to create a Java web application on top of Google AppEngine.

What is the best way to develop a REST jSON API?

Do I have to write from scratch a servlet that manages the jSON handling or there is a library or something like the SOAP support for web services?

Was it helpful?

Solution

No need to write a servlet from scratch, use JAX RS, it is easy and simple http://tugdualgrall.blogspot.com/2010/02/create-and-deploy-jax-rs-rest-service.html

OTHER TIPS

Try RESTEasy. It has superb docs and there nice examples to be found. It integrates with Jackson which is IMO the best JSON lib for java.

If you use jersey then you should have a look at Genson http://owlike.github.io/genson/. It is a full databinding+streaming java<>json library. And as a bonus with jersey you only need to have genson in your classpath and voila! Everything shall work without any configuration.

the answer here might be what you're looking for. (Gson should be able to both generate and parse JSON)

After some research I think that using jersey is a good

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top