使用 C# 反序列化 JSON - Deserialize JSON with C#

10/14 05:31
阅读数 0

问题:

I'm trying to deserialize a Facebook friend's Graph API call into a list of objects.我正在尝试将 Facebook 朋友的Graph API调用反序列化为对象列表。 The JSON object looks like: JSON 对象如下所示:

{"data":[{"id":"518523721","name":"ftyft"},
         {"id":"527032438","name":"ftyftyf"},
         {"id":"527572047","name":"ftgft"},
         {"id":"531141884","name":"ftftft"},
         {"id":"532652067","name"...

List<EFacebook> facebooks = new JavaScriptSerializer().Deserialize<List<EFacebook>>(result);

It's not working, because the primitive object is invalid.它不起作用,因为原始对象无效。 How can I deserialize this?我怎样才能反序列化这个?


解决方案:

参考一: https://en.stackoom.com/question/X7sP
参考二: https://stackoom.com/question/X7sP
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部