mailjet / mailjet-apiv3-dotnet

[API v3] Official Mailjet API v3 .NET wrapper
https://dev.mailjet.com
MIT License
75 stars 31 forks source link

Default JSON serializer settings serialize properties in pascal case #107

Closed borisStanojevic closed 1 year ago

borisStanojevic commented 1 year ago

The default JSON serialization settings in MailjetClient use pascal case property name resolving (by default). Since JSON properties are in camel case by nature, maybe it would be good to add the ContractResolver = new CamelCasePropertyNamesContractResolver() to the serializer settings, or even better, allow for the settings to be injected through the constructor.

dmytrosvystun88 commented 1 year ago

Hi! Yes, we could inject the setting and set the desired contract resolver to CamelCasePropertyNamesContractResolver. But it looks like it doesn't bring value into the product. Please let me know if I'm missing something.

Considering that official Mailjet documentation uses pascal case everywhere this change can add a confusion.