Project, the XML returned to the server has been obtained and has been parsed.
Value= (String) result.getproperty ("Value"). ToString (). Trim ();
Jsonobject obj = new Jsonobject (value);
Jsonarray Jsonarray = Obj.getjsonarray ("Event");
At the time of doing jsonarray parsing,
for (int i = 0; i < jsonarray.length (); i++) {
Jsonobject json = Jsonarray.getjsonobject (i); This has been an error java.lang.String cannot be converted to Jsonobject
I'll change the back.
Jsonobject json = (jsonobject) jsonarray.get (i);
Jsonobject json = Jsonarray.getjsonobject (i);
Same error ... cannot be converted into jsonobject. I couldn't figure it out. How can I not convert, then retrieve the next difference between new
Will
Jsonobject json = Jsonarray.getjsonobject (i);
Revision changed to
Jsonobject json = new Jsonobject (jsonarray.getstring (i)), after which it can be parsed correctly.
Android JSON get value string cannot be converted to Jsonobject