How to get my data from website so I can parse it?
This question already has an answer here:
You can use this:
BufferedReader reader = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8"))); String parseThis = reader.readLine();
That'll give you a string of the output. If it's in JSON, add:
JSONObject jsonObj = new JSONObject(parseThis); JSONArray arrayOfStuff = jsonObj.getJSONArray(array_tag);
上一篇: 8字节[]为字符串