Read JSON object in java

Possible duplicate:
Best Java JSON library?

How can we read a JSON object in JSP, Servlet, or in any other Java program?

+5
source share
5 answers

I would recommend using Gson . The advantage is that it supports generics very well and also has high performance. I have already posted an example Gson#fromJson(): Converting JSON to Java

+5
source

The json library has a JAR from. Also, based on this answer , you can look at JSON-lib

+5

JSON.org contains a lot of good information about reading JSON in Java (and other languages). They provide a good reference implementation that many other libraries use.

+3
source

Take a look at Jackson .

+3
source

Using a library, such as described at: http://www.json.org/java/

Looking at the gson description , it looks like it will do the job too.

+2
source

All Articles