我使用JSON.NET库反序列化从Facebook返回的数据有点麻烦。 从简单的墙上post返回的JSON看起来像: { "attachment":{"description":""}, "permalink":"http://www.facebook.com/permalink.php?story_fbid=123456789" } 返回的照片JSON看起来像: "attachment":{ "media":[ { "href":"http://www.facebook.com/photo.php?fbid=12345", "alt":"", "type":"photo", "src":"http://photos-b.ak.fbcdn.net/hphotos-ak-ash1/12345_s.jpg", "photo":{"aid":"1234","pid":"1234","fbid":"1234","owner":"1234","index":"12","width":"720","height":"482"}} ], 一切都很好,我没有问题。 我现在从移动客户端遇到了一个简单的贴子,使用下面的JSON,现在反序列化失败了,只有这一个post: "attachment": { "media":{}, "name":"", "caption":"", "description":"", "properties":{}, "icon":"http://www.facebook.comhttp://img.dovov.comicons/mobile_app.gif", "fb_object_type":"" }, "permalink":"http://www.facebook.com/1234" 这是我正在反序列化的类: public class FacebookAttachment { public string Name { get; set; } public string Description { get; set; } public string Href { get; set; } […]