问题 1
代码语言:javascript复制org.jsoup.UnsupportedMimeTypeException:
Unhandled content type. Must be text/*, application/xml, or application/xhtml xml. Mimetype=application/json;charset=UTF-8, URL=
解决 1
代码语言:javascript复制添加.ignoreContentType(true)
例:
.ignoreContentType(true).timeout(3000).execute();
问题 2
获取json数据,restful接口
代码语言:javascript复制Element body = doc.body();JSONObject
json = JSONObject.fromObject(body.text());