Tôi sử dụng RestSharp trong dự án Windows Phone 7.1 của mình.RestSharp - WP7 - Không thể deserialize XML vào danh sách
Tôi có một phản ứng trong định dạng XML ở đây: https://skydrive.live.com/redir.aspx?cid=0b39f4fbbb0489dd&resid=B39F4FBBB0489DD!139&parid=B39F4FBBB0489DD!103&authkey=!AOdT-FiS6Mw8v5Y
Tôi cố gắng để deserialize rằng đối phó với một lớp:
public class fullWall
{
public _user user { get; set; }
public int numberOfFriend { get; set; }
public int numberOfPhoto { get; set; }
public List<timhotPhotos> timhotPhotos { get; set; }
public fullWall()
{
timhotPhotos = new List<timhotPhotos>();
}
}
Tất cả các thuộc tính là ok trừ danh sách timhotPhotos
, như bạn có thể xem tại đây :
timhotPhotos lớp:
public class timhotPhotos
{
public string id { get; set; }
public string title { get; set; }
public string description { get; set; }
public string url { get; set; }
public double width { get; set; }
public double height { get; set; }
public DateTime createdDate { get; set; }
public _user user { get; set; }
public int numOfComment { get; set; }
public int numOfRate { get; set; }
public int numOfView { get; set; }
public bool rated { get; set; }
}
Tôi đang ở đâu sai?
Tôi sẽ viết một vài dòng mã để tuần tự hóa một số đối tượng XML và sau đó kiểm tra sự khác biệt giữa tệp XML được tạo và tệp XML của bạn – JonAlb
cố gắng thả hàm tạo fullWall hoặc thả timhotPhotos initialization –