您收到的是从
InputStream附加到a
StringBuffer并
String最终转换为的一系列字符-因此,结果是
String可以的:)
您想要的是通过
org.json.*类似这样的类对该字符串进行后处理
String page = new Communicator().executeHttpGet("Some URL");JSonObject jsonObject = new JSonObject(page);然后继续
jsonObject。由于您收到的数据是一个数组,因此您可以说
String page = new Communicator().executeHttpGet("Some URL");JSonArray jsonArray = new JSonArray(page);for (int i = 0 ; i < jsonArray.length(); i++ ) { JSonObject entry = jsonArray.get(i); // now get the data from each entry}


