-2
我想解析一些來自Android中的URL的JSON。 JSON看起來像下面這樣:無法解析JSON到Android
[{"ID":6,"Username":"heather","Guide":false},{"ID":7,"Username":"heather","Guide":false},{"ID":9,"Username":"heather","Guide":false},{"ID":11,"Username":"heather","Guide":false}]
我可以得到JSON對象。但後來我努力把它變成一個JSONArray,因爲沒有JSONArray參數的值。
我曾嘗試:
reader = new JSONObject(result);
jsonArray = reader.getJSONArray("");
以及
reader = new JSONObject(result);
jsonArray = reader.getJSONArray();
而且我不知道什麼嘗試。