安卓json文件怎么打开 怎么获取安卓apk请求的json地址?
怎么获取安卓apk请求的json地址?Httpclient=new Httpclient()postmethod post=new postmethod(“your URL”)//准备参数,可以是多个
怎么获取安卓apk请求的json地址?
Httpclient=new Httpclient()
postmethod post=new postmethod(“your URL”)//准备参数,可以是多个
namevaluepair simcard=new namevaluepair(“key”,“值)”post.setRequestBody(New namevaluepair[]{simcard})]//执行请求client.executeMethod方法(方法)
//获取返回值
字符串响应=新字符串(方法.getResponseBodyAsString(). GetBytes(“iso-8859-1”)
//有很多方法可以将JSON字符串转换为对象
sonobject result=new jsonobject(response)