php - Error parsing data org.json.JSONException -
i'm working php, json, , android create mobile app can retrieve data mysql database. i'm able data database but, when try specific data based on user input i'm unable data. i've try discovered solution through google can't solve it. got following error logcat :
05-20 08:44:28.152: e/json parser(313): error parsing data org.json.jsonexception: value <br of type java.lang.string cannot converted jsonobject<br /> 05-20 08:44:28.152: e/json parser(313): <b>warning</b>: array_push() expects parameter 1 array, null given in <b>c:\xampp\htdocs\android\getspesificname.php</b> on line <b>31</b><br /> 05-20 08:44:28.152: e/json parser(313): {"success":1,"mahasiswa":null} 05-20 08:44:28.152: d/specific name(313): {"mahasiswa":[{"nama_mhs":"kurnianto"},{"nama_mhs":"amjad"},{"nama_mhs":"oki"},{"nama_mhs":"tes"},{"nama_mhs":"coba"},{"nama_mhs":"raditya"},{"nama_mhs":"edwin"}],"success":1}
this php code http://pastebin.com/dbur5dzj jsonparser class http://pastebin.com/fyxswyr4 specific class http://pastebin.com/uksdh3bn
any appreciate. thanks.
you have error on line 29 of php file. line:
$respone["mahasiswa"] = array();
should be:
$response["mahasiswa"] = array();
Comments
Post a Comment