当前位置: 代码迷 >> ASP.NET >> .NET2.0 解析JSON有关问题
  详细解决方案

.NET2.0 解析JSON有关问题

热度:5218   发布时间:2013-02-25 00:00:00.0
.NET2.0 解析JSON问题
 
  如下JSON串, 
 
C# code
    { "name": "潍坊市奎文区东风东街360号", "Status": { "code": 200, "request": "geocode" },"Placemark": [ { "id": "p1", "address": "360号 Dongfeng E St, Kuiwen, Weifang, Shandong, China", "AddressDetails": { "Accuracy" : 8, "Country" : { "AdministrativeArea" : { "AdministrativeAreaName" : "山东省", "Locality" : { "DependentLocality" : { "DependentLocalityName" : "奎文区", "Thoroughfare" : { "ThoroughfareName" : "东风东街360号" } }, "LocalityName" : "潍坊市" } }, "CountryName" : "中国", "CountryNameCode" : "CN" } }, "ExtendedData": { "LatLonBox": { "north": 36.7106660, "south": 36.7079680, "east": 119.1137200, "west": 119.1110220 } },    "Point": { "coordinates": [ 119.1123710, 36.7093170, 0 ] }   }   ]   }  
 
 
 用Newtonsoft.Json 的jsonReader
C# code
 错误    1    无法创建抽象类或接口“Newtonsoft.Json.JsonReader”的实例    C:\Com.AoTianhuoli\Com.AoTianhuoli.Web\com.GgMap\getLocalhostAddress.aspx.cs    65    45    Com.AoTianhuoli.Web

 

 



------解决方案--------------------------------------------------------
错的那行代码怎么没有?
------解决方案--------------------------------------------------------
无法创建抽象类或接口它都提示了。无法创建抽象类或接口
------解决方案--------------------------------------------------------
直接用 JsonConvert.DeserializeObject<T>("...")
http://james.newtonking.com/projects/json/help/Index.aspx
  相关解决方案