如何在Android中将Xml字符串转换为Json对象
问题描述:
我是Android新手..我在 Asp.net 中创建 JSON Web服务使用C#这是我的网络服务响应
string xmlns =http://tempuri.org/{Cargo:[{Status:Pickup}]} / string
然后我创建了 Android项目以使用 json解析来获取上面的webservice到listview ..
但是我在logcat中出错了
java.lang.String类型的xml无法转换为JSONObject
请帮帮我。
提前致谢
Hi, Am New to Android.. I Created JSON Webservice in Asp.net Using C# This is my webservice Responce
string xmlns="http://tempuri.org/"{ "Cargo": [{"Status":"Pickup "}]}/string
then i created Android project to get above webservice to listview using json parsing..
but i got error in logcat
xml of type java.lang.String cannot be converted to JSONObject
Please help me.
Thanks in advance
答