0
Asp.Net MVC에서 Restsharp를 사용하여 복잡한 객체를 직렬화하는 데 문제가 있습니다. 객체를 보내면 객체가 도착하지 않고 문자열이나 int 또는 long으로 도착합니다Restsharp JSON의 복잡한 객체를 직렬화합니다.
public class Project
{
public long Id { get; set; }
public string NumPol { get; set; }
public string Name { get; set; }
public string Status { get; set; }
public System.DateTime CreationDate { get; set; }
public System.DateTime RenewalDate { get; set; }
public System.DateTime ExpirationDate { get; set; }
public long Notification { get; set; }
public decimal TotalSum { get; set; }
public int NoRenewal { get; set; }
public int Cancellation { get; set; }
public IList<Coin> Coinss { get; set; }
}
public class Moneda
{
public int Id { get; set; }
public string Name { get; set; }
}
과 Restsharp : 해결하는 방법에
RestClient client = new RestClient("http://localhost:9212/");
RestRequest request = new RestRequest("Pol/CreatePol", Method.PUT);
request.RequestFormat = DataFormat.Json;
request.AddObject(project);
IRestResponse<ProjectoPol> response = client.Execute<ProjectoPol>(request);
제안, 목록 또는 IList의 객체에 도착하지 않습니다 이것은
내 객체 이??