I need to deserialize an object that has a different name according to Get or Post.
I am working with visual studio (VB) with the class HttpClient
and Newtonsoft's Json.NET. When I make the call get the object is presented like this:
- id (int)
- name (str)
- type (int)
When I make the call Post the requested JSON is:
- id (int)
- name (str)
- type_sii (int)
The problem is that my object is declared like this:
<JsonProperty ("id")>
Public Property Id As Integer
<JsonProperty ("name")>
Public Property Name As String
<JsonProperty ("type")>
Public Property Type As Integer
Then the object its good me when I make the GET call, how can I change the property (Type) when I want to make a post call? (change to "type_sii")