You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the API entities rely on the Newtonsoft JsonProperty attribute to serialize correctly. By default RestSharp does not use Newtonsoft JsonNetSerializer which means the request body does not get serialized with the correct property names
For example nexus_addresses should look like this:
This caused the API to return incorrect tax information as I'm assuming the nexus addresses do not get deserialized properly and are required for my use case.
To fix this we could set the Serializer when building the RestRequest Note: you will need to reference the package RestSharp.Serializers.NewtonsoftJson
var request = new RestRequest(action, method)
{
RequestFormat = DataFormat.Json, JsonSerializer = new JsonNetSerializer()
};
The text was updated successfully, but these errors were encountered:
All of the API entities rely on the Newtonsoft
JsonProperty
attribute to serialize correctly. By default RestSharp does not use Newtonsoft JsonNetSerializer which means the request body does not get serialized with the correct property namesFor example nexus_addresses should look like this:
instead it gets serialized (When using the
NexusAddress
class instead of just a dynamic) as:Notice the casing.
This caused the API to return incorrect tax information as I'm assuming the nexus addresses do not get deserialized properly and are required for my use case.
To fix this we could set the Serializer when building the RestRequest Note: you will need to reference the package
RestSharp.Serializers.NewtonsoftJson
The text was updated successfully, but these errors were encountered: