Using JSON in Java

Quick blog, not much time…

I figured this is worth blogging through.

OK so I have a JSON output from a HTTP request that gets saved to a file, all using Java. I now want to parse the file and get some work done. Here is what I did.

Imports are

http://commons.apache.org/downloads/download_jxpath.cgi

http://code.google.com/p/json-simple/downloads/list

import org.apache.commons.jxpath.JXPathContext;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
import org.json.simple.parser.ContainerFactory;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s