我正在从 web 服务中获取数据,并将其解析为 JSON 字符串。解析时我是这个异常:“org.json.JSONException: Unterminated string at character 1834”
我的代码是,
String jsonstring=getJSONString(response);
JSONObject json = new JSONObject(jsonstring);
字符串是,
[{"LotDescription":"David Weekley homes Traditional Collection in Baxter Village offers floor plans featuring innovative design and unsurpassed quality. This charming community combines work, play and living, all within the Village. In Baxter Village, you’ll enjoy: Parks, playgrounds"}]
它一直解析到“Village”一词,并在解析“you'll”时引发异常,这似乎是一些 HTML 内容。
解决方案是什么?