Sunday, December 23, 2012

JSON parsing in ANDROID (simple example)

JSON String


private String jString =
"{\"menu\": {\"id\": \"file\", \"value\": \"File\", \"popup\": " +
"{ \"menuitem\": [ {\"value\": \"New\",   \"onclick\": \"CreateNewDoc()\"}, " +
"{\"value\": \"Open\", \"onclick\": \"OpenDoc()\"}, {\"value\": \"Close\", " +
"\"onclick\": \"CloseDoc()\"}]}}}";


Use this code to parsing JSON.


out put of this code :