Error added: 2009-12-19T15:10:41Z
It seems from the second example on this page http://code.google.com/p/json-simple/wiki/DecodingExamples that you are meant to be able to cast an JSONArray to an JSONObject: String s=\"[0,{\\\"1\\\":{\\\"2\\\":{\\\"3\\\":{\\\"4\\\":[5,{\\\"6\\\":7}]}}}}]\"; Object obj=parser.parse(s); JSONArray array=(JSONArray)obj; System.out.println(array.get(1)); JSONObject obj2=(JSONObject)array.get(1); System.out.println(obj2.get(\"1\")); Or am I not reading it right here?
Stop trying to cast it to a JSONArray then! :)
this error appear when i cast it to a JSONObject :p, but it although i didn\'t use JSONArray ! toc!
If you know the answer, please add your own solution below.
If you don't know, but find out later, please come back and share your answer - there will be other people
struggling with this too.
If you want to be notified via email when this is solved, enter your email address here: