如题,例如解析数据
  {"comments":[{"content":"很不错嘛","id":1,"nickname":"纳尼"},{"content":"哟西哟西","id":2,"nickname":"小强"}],"content":"你是木头人,哈哈。","infomap":{"性别":"男","职业":"程序员","博客":"http:\/\/www.cnblogs.com\/codeplus\/"},"title":"123木头人"}

解决方案 »

  1.   

    用开源的第三方吧,我用的Newtonsoft.Json挺好用的。
      

  2.   

    JavaScriptSerializer seri = new JavaScriptSerializer();
    seri.Deserialize<T>(jsonString);T 是你的JSON对于的实体类
      

  3.   

    http://topic.csdn.net/u/20110415/10/68105da2-1b5a-45b4-88f6-540d4eaa820d.html
      

  4.   


    我用的4.0  怎么引用不成功啊??第一种:
    using System.Web.Script.Serialization;
      Script下有波浪线!
    第一种:
    using System.ServiceModel.Web;
    using System.ServiceModel;
    using System.Runtime.Serialization.Json;
             Web下有波浪线!
    哪位高手解释一下
    ???
      

  5.   

    你可以用CodeTitans.JSon
    地址是:http://codetitans.codeplex.com/
                JSonReader reader = new JSonReader();
                IJSonObject json = reader.ReadAsJSonObject("字符串型的Json数据");
                return json["项目名称"].StringValue;//是什么类型的就获取什么属性,其他的还有Int32Value等
    如果要获取嵌套的            JSonReader reader = new JSonReader();
                IJSonObject json = reader.ReadAsJSonObject("字符串型的Json数据");
                return json["子项目名"];//IJSonObject