在 logcat 上以 json 形式获取响应
{
"Generalinfor": {
"type": "Response",
"name": "abcde",
"ver": "3.0.0"
},
"Login": {
"errorCode": "001",
"errorMsg": "Login Failed - Missing of Password",
"userID": "0",
"versionAvail": "",
"versionDownloadMsg": "can't login "
}
}
我从我的网络服务器上的 logcat
上收到 json
格式的响应。现在我想将其转换为字符串并在模拟器上显示此图像。我怎样才能做到这一点?
请指导我任何可能的提示或示例代码。
{
"Generalinfor": {
"type": "Response",
"name": "abcde",
"ver": "3.0.0"
},
"Login": {
"errorCode": "001",
"errorMsg": "Login Failed - Missing of Password",
"userID": "0",
"versionAvail": "",
"versionDownloadMsg": "can't login "
}
}
I am getting response in json
format on logcat
from my web server.Now i wanted to convert it into string and to displayed this image on emulator. How can I accomplish this?
Please guide me with any tips or sample code possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://www.json.org/javadoc/org/json/JSONObject.html
http://www.json .org/javadoc/org/json/JSONObject.html#get(java.lang.String)
等...
http://www.json.org/javadoc/org/json/JSONObject.html
http://www.json.org/javadoc/org/json/JSONObject.html#get(java.lang.String)
etc...