获取JSON字符串数组

时间:2015-05-05 08:13:44

标签: c# json parsing

我想将JSON字符串解析为我的类对象。你能告诉我这里弄错了什么吗?

public class Users
{
    public List<SteamUser> data { get; set; }
}

public class SteamUser
{
    public string id { get; set; }
    public string[] weapons { get; set; }
}

class Program
{
    static void Main(string[] args)
    {
        var return_value = "{"user":"76561198005159244","items":["41750778","25316150"]}{"user":"76561198005159244","items":["41750778"]}";

        Users steamUsers = new JavaScriptSerializer().Deserialize<Users>(return_value);
    }
}

0 个答案:

没有答案