Hi when I run the following
jsonData = NetUtils.getHTTPFile("http://www.iobridge.com/api/feed/key=" + feedKey);
JSONParser parser = new JSONParser();
Object obj = null;
//parse the JSON data
try {
obj = parser.parse(jsonData);
} catch (ParseException e) {}
JSONArray array=(JSONArray)obj;
System.out.println(array.get(1));
JSONObject obj2=(JSONObject)array.get(1);
System.out.println(obj2.get("1"));
I get the following Exception
Exception in thread "main" java.lang.ClassCastException:
org.json.simple.JSONObject
at IOB.IOBModule.<init>(IOBModule.java:33)
at myroomcontrol.Main.main(Main.java:30)
Java Result: 1
Original issue reported on code.google.com by callum.j...@gmail.com on 17 Feb 2009 at 9:31
Original issue reported on code.google.com by
callum.j...@gmail.com
on 17 Feb 2009 at 9:31