Please , help. I am trying to deserialize json string(
{"response":[259,{"body":"я тебе ","mid":17759,"uid":18537276,"from_id":18537276,"date":1345466897,"read_state":1,"out":1},{"body":"jdjdjdjd","mid":17736,"uid":18537276,"from_id":18537276,"date":1345400400,"read_state":1,"out":1,"attachment":{"type":"doc","doc":{"did":118620269,"owner_id":18537276,"title":"IMG_20120722_220434.jpg","size":475878,"ext":"jpg","url":"http:\/\/vk.com\/doc18537276_118620269?hash=59f1fe51a02a65519c&dl=3972a9297f3da6a20c","thumb":"http:\/\/cs4343.vkontakte.ru\/u18537276\/-3\/m_69a4a578da.jpg","access_key":"7a6cb6559b179dec16"}}
) etc.
Here is code:
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(Response_GetHistory));
Response_GetHistory gh = new Response_GetHistory();
gh = (Response_GetHistory)ser.ReadObject(stream);
here is class
public class Response_GetHistory
{
public int s;
public Message[] response;
}
public class Message
{
public string mid;
public string uid;
public string date;
public string read_state;
public string title;
public string body;
public Attachments attachments;
public Message fwd_messages;
public string chat_id;
public string chat_active;
public string users_count;
public string admin_id;
public string deleted;
}
but deserialization failed;
I think becase of number 259..What should I change in my classes?