.net后台如何操作json格式的数据?
json直接为键值的自己可以操作,但是Json里既有键值对,还有数组的,就不会了,忘高手赐教!!json为:{"address":"CN|\u9655\u897f|\u8...
json直接为键值的自己可以操作,但是Json里既有键值对,还有数组的,就不会了,忘高手赐教!!
json为:
{
"address":"CN|\u9655\u897f|\u897f\u5b89|None|CHINANET|1|None",
"content":{
"address":"\u9655\u897f\u7701\u897f\u5b89\u5e02",
"address_detail":{
"city":"\u897f\u5b89\u5e02",
"city_code":233,
"district":"",
"province":"\u9655\u897f\u7701",
"street":"",
"street_number":""
},
"point":{
"x":"108.95309828",
"y":"34.27779990"
}
},
"status":0
} 展开
json为:
{
"address":"CN|\u9655\u897f|\u897f\u5b89|None|CHINANET|1|None",
"content":{
"address":"\u9655\u897f\u7701\u897f\u5b89\u5e02",
"address_detail":{
"city":"\u897f\u5b89\u5e02",
"city_code":233,
"district":"",
"province":"\u9655\u897f\u7701",
"street":"",
"street_number":""
},
"point":{
"x":"108.95309828",
"y":"34.27779990"
}
},
"status":0
} 展开
3个回答
展开全部
用Newtonsoft.Json效率高,自己拼接的话很容易出错,如果是自己拼接的话,可以用
http://jsonlint.com
这个网址进行验证
数组格式为
{
"Persion": [
{
"name": "aa",
"age": 10
},
{
"name": "bb",
"age": 30
}
]
}
http://jsonlint.com
这个网址进行验证
数组格式为
{
"Persion": [
{
"name": "aa",
"age": 10
},
{
"name": "bb",
"age": 30
}
]
}
追问
呵呵,谢谢亲的耐心回答,我解决了,呵呵!!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询