jsonp
Connection conn = Jsoup.connect("http://ip.taobao.com/service/getIpInfo.php?ip=" + ip); Document doc = conn.get(); System.out.println(JSON.parse(doc.text())); JSONObject.parseObject(doc.text()); String data = JSONObject.parseObject(doc.text()).get("data").toString(); String city = (String) JSONObject.parseObject(data).get("region").toString(); String ips = (String) JSONObject.parseObject(data).get("isp");
http://blog.csdn.net/column/details/jsoup.html
时间: 2024-11-04 21:41:10