json格式的数组和json格式的map字符串的拼写

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/buster2014/article/details/45767141

json数组:

 [{"CityId":18,"CityName":"西安","ProvinceId":27,"CityOrder":1},{"CityId":53,"CityName":"广州","ProvinceId":27,"CityOrder":1}] 

效果图1:


========================================================================================================

串里对每个city对象单独添加了一对{}:

[{"city1":{"CityId":18,"CityName":"西安","ProvinceId":27,"CityOrder":1}},{"city2":{"CityId":53,"CityName":"广州","ProvinceId":27,"CityOrder":1}}]

效果图2:



========================================================================================================

串里对所有的city对象只添加了一对大的{}:

[{"city1":{"CityId":18,"CityName":"西安","ProvinceId":27,"CityOrder":1},"city2":{"CityId":53,"CityName":"广州","ProvinceId":27,"CityOrder":1}}]

效果图3:






展开阅读全文

没有更多推荐了,返回首页