문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top