shawnmclean/Mandrill-dotnet

JSON.cs not used in MandrillApi.cs

Closed this issue · 2 comments

Hello!

Line 154 in MandrillApi.cs:
requestContent = JsonConvert.SerializeObject(data);

Shouldn't it be like this:
requestContent = JSON.Serialize(data);

Otherwise the settings set in JSON.cs like SnakeCaseNamingStrategy aren't included which results in wrong property names in the request.

Or are we missing something?

Hi @ZentaSE!

Is there something not being serialized correctly from/to Mandrill?

Before changing it we got faulty requests against Mandrill because the properties had the wrong casing.

For example
"Message": {
Instead of:
"message": {

We have our own fork of the project so we changed the above line and then it works great!