user3497266
user3497266

Reputation: 97

Parsing a json string in java

I am trying to parse a json string of the format :

{"magha": {"2014-04-04 14:27:08.669217": "125"}}

I am not able to create a parser for the same. Looking forward for any help.

Upvotes: 1

Views: 82

Answers (1)

Nambi
Nambi

Reputation: 12042

Download the json-lib-jar

Use JSONObject

Do like this

JSONObject jobject=new JSONObject(yourjsonstring);
String magha=jobject.getString("magha");

Upvotes: 3

Related Questions