parse json with a callback function in android -
i firing request through android application using httppost , request returning json callback function , don't know how handle , parse it.
returned format:
handleemployeeresponse({ "records": [ { "fulldesc": "records employe", "id": "emp_1", "name": "jack" } ] });
in firebug can see response text
handleemployeeresponse({"records":[{"fulldesc":"records employe","id":"emp_1","name":"jack"}]});
if parse above response using jsonobject jobject = new jsonobject(jstring); surely gonna json parsing error above response not valid json @ have remove "handleemployeeresponse , ( , ); " form response string need pass jsonobject can tell me how parse json callback function in android
it looks service returning response in jsonp
format (json padding). either need regex out json message, or find out way ask service not return padding.
Comments
Post a Comment