Deserialize JSON with C#

前端 未结 10 1463
一生所求
一生所求 2020-11-21 05:57

I\'m trying to deserialize a Facebook friend\'s Graph API call into a list of objects. The JSON object looks like:

{\"data\":[{\"id\":\"518523721\",\"name\"         


        
10条回答
  •  余生分开走
    2020-11-21 06:17

    I agree with Icarus (would have commented if I could), but instead of using a CustomObject class, I would use a Dictionary (in case Facebook adds something).

    private class MyFacebookClass
    {
        public IList> data { get; set; }
    }
    

    or

    private class MyFacebookClass
    {
        public IList> data { get; set; }
    }
    

提交回复
热议问题