{
    "msgtype": 10,
    "id": "1;2",
    "person": [
        {
            "username": "someone",
            "password": "123456",
            "client": 1
        },
         {
            "username": "someone1",
            "password": "123456",
            "client": 2
        }    ]
}
json.netC#wpf

解决方案 »

  1.   

    定义两个类:
    public class JsonData
    {
    public int msgtype
    {
    get;set;
    }
    public string id
    {
    get;set;
    }
    public List<person> person
    {
    get;set;
    }
    }public class person
    {
    public string username
    {
    get;set;
    }
    public string password
    {
    get;set;
    }
    public int client
    {
    get;set;
    }
    }然后参考如下:
    http://www.cnblogs.com/txw1958/archive/2012/08/01/csharp-json.html
      

  2.   

    可以去下载 Newtonsoft.Json.dll,直接将字符串解析为类实例
      

  3.   


    引用json类库.然后新增实体类按一般的编,有问题google下Json实例化