Estou com dificuldade em deserializar um JSON. Estou recebendo o seguinte conteúdo:
"response":{
"account":{
"name":"Evandro Teste",
"owners":[],
"creationDate":"2017-07-07T07:18PDT",
"city":"Guarulhos",
"description":"",
"state":"São Paulo",
"accountId":45,
"lastUpdated":"2017-07-07T07:18PDT",
"phone":"+55111231233",
"country":"",
"parentId":-1,
"industry":"Teste",
"address":"Rua Teste",
"relationshipUrls":{
"owners":"http://localhost/v1/object/account/45/owners",
"attachments":"http://localhost/v1/object/account/45/attachment",
"comment":"http://localhost/v1/object/account/45/comment",
"contactlog":"http://localhost/v1/object/account/45/contactlog",
"historylog":"http://localhost/api/v1/object/account/45/historylog"
}
}
},
"status":{
"success":true,
"detail":{}
}
Meu problema é como faço para deserialize esse JSON deixando de lado o response. Ou seja, preciso criar um objeto do tipo Account, ignorando o response(Que retorna no Json).
Estou usando o Restsharp e tentando fazer o mesmo usando também o JavaScriptSerializer.
Segue abaixo minha entidade:
public class Account
{
public string name { get; set; }
public string creationDate { get; set; }
public string city { get; set; }
public string description { get; set; }
public string state { get; set; }
public string fax { get; set; }
public int accountId { get; set; }
public string lastUpdated { get; set; }
public string mapQuest { get; set; }
public string phone { get; set; }
public string country { get; set; }
public int parentId { get; set; }
public string googleSearch { get; set; }
public string linkedInSearch { get; set; }
public string industry { get; set; }
public string address { get; set; }
public string AcctType { get; set; }
public string websiteURL { get; set; }
public string zipCode { get; set; }
}