字符275對象未結束我的代碼已經得到網站的數據(jsonstr),但不能使它到的JSONObject並使其錯誤JSON解析錯誤:未結束的對象人品2755JSON解析錯誤:在
protected Void doInBackground(Void... arg0) {
HttpHandler sh = new HttpHandler();
// Making a request to url and getting response
String jsonStr = sh.makeServiceCall(url);
Log.e(TAG, "Response from url: " + jsonStr);
if (jsonStr != null) {
try {
JSONObject jsonObj = new JSONObject(jsonStr);
// Getting JSON Array node
JSONArray contacts = jsonObj.getJSONArray("Destinasi");
// looping through All Contacts
for (int i = 0; i < contacts.length(); i++) {
JSONObject c = contacts.getJSONObject(i);
String nim = c.getString("nama_destinasi");
String name = c.getString("alamat_destinasi");
String alamat= c.getString("deskripsi_destinasi");
而這個鏈接,我嘗試分析 https://ombajuom.000webhostapp.com/json_destinasi.php/Destinasi
請幫助我,對不起我的英語
我知道了,謝謝它的工作 –