我在下面有一个json响应
{"data":[{"name":"Shi","gender":"male","id":"5288","picture":{"data{"url":"https:\\/fbcdnprofile-a.\/hprofile-ak-frc3\/t1.0\/p50/551182_10152227358459008_326007305_n.jpg","is_silhouette":false}}}{"name":"Nagarajan","gender":"male","id":"557811","picture":{"data":{"url":"https:\/\/fbcdnprofilea.akamaih\/hprofile-ak-xpf1\/t1.0-1\/c8.0.50.50\/p50x5\/10389990_10152395979004812_6804136212372558329_n.jpg","is_silhouette":false}}}
我想反序列化它,我的代码块是
JavaScriptSerializer js = new JavaScriptSerializer();
FaceBookFriendsModel friedDATA= js.Deserialize<FaceBookFriendsModel>(friendsData);
我的FaceBookFriendsModel是
public class FaceBookFriendsModel
{
List<fbFriends> data { get; set; }
}
和fbFriends类是
public class fbFriends
{
public string name { get; set; }
public string gender { get; set; }
public long id { get; set; }
public picture picture { get; set; }
}
图片类是
public class picture
{
public data data { get; set; }
}
我在friedDATA中得到null