返回的就字符串:[{"fpdm": "031001770151"}]
Exception in thread "main" net.sf.json.JSONException: A JSONArray text must start with '[' at character 1 of [{"fpdm": "031001770151"}]
at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:512)
at net.sf.json.JSONArray._fromJSONTokener(JSONArray.java:1144)
at net.sf.json.JSONArray._fromString(JSONArray.java:1224)
at net.sf.json.JSONArray.fromObject(JSONArray.java:149)
at net.sf.json.JSONArray.fromObject(JSONArray.java:127)
at com.aisin.text.Text.main(Text.java:48)
main{
String sendPost = SendPost.sendPost("http://xxx.com/","JMphnPAWC1UCRFagTnAsB5sFtrlE0NGmxJMQ/FFupriKfWgxYtFXAdvkzTVcEfqQp9a2NBNHMLK2I9kKIa6Y2hMxzqwI8/wLaT44Zqmv2jDCDzhhlVB6IcRFu2owAnPoEfix9/TWrtoUeLcRY1VY9g==");
System.out.println("返回的就字符串:"+sendPost);
48 JSONArray arr=JSONArray.fromObject(sendPost);//先转化成json数组
49 JSONObject js=JSONObject.fromObject(arr.get(0).toString());//获取数组第一个json的字符串 并转化成json对象
50 System.out.println(js.getString("fpdm"));//获取columnName值
}