org.json.JSONException: Expected a ',' or '}' at character 62

       StringBuffer resposeBuffer = new StringBuffer("");

        String lines;
        while((lines = reader.readLine()) != null) {
            lines = new String(lines.getBytes(), "utf-8");
            resposeBuffer.append(lines);
        }

        reader.close();
        connection.disconnect();

        JSONObject respose = new JSONObject(resposeBuffer.toString());

原因:lines 中文亂碼,resposeBuffer 中文亂碼。亂碼如下,
這裏寫圖片描述
這裏寫圖片描述

解決辦法:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章