无法反序列化Json字符串

时间:2014-07-19 08:58:36

标签: .net c#-4.0 json.net

我在下面有一个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

0 个答案:

没有答案