作者:
jiqian (JIM)
2016-02-15 16:07:40我要做的事情主要就是
loop( 讀圖 -> 把路徑存成JSON Object )
-> 把Objects 放到 JSON Array
但try裡面那行一直出現 unhandled exception org.json.jsonexception
請問我該怎麼做,漏掉了什麼嗎?
謝謝
JSONArray JArray=new JSONArray();
JSONObject JOject =new JSONObject();
for (int img_count = 0 ; img_count<image_count ;img_count++) {
img_adress[img_count] = way.get(img_count);
try {
JOject.put("PATH", img_adress[img_count]);
}catch (IOException e){
Log.e("Path","Failed",e);
}
JArray.put(JOject);
}