twilio-csharp icon indicating copy to clipboard operation
twilio-csharp copied to clipboard

Specify culture when serializing data

Open janousek opened this issue 5 years ago • 1 comments

You must specify a culture when calling the ToString method on a numeric type. There are different decimal separators in different countries and when you do not specify culture, national culture is used. This results in unexpceted format of request. The main problem for me is serialization of maxPrice: https://github.com/twilio/twilio-csharp/blob/c2e2430e97c5e49504dba4a3d5f82c093628040d/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs#L139

In Czech culture (cs-CZ) the nember is serialized as: "0,58" and not like "0.58" as expected.

janousek avatar Mar 05 '20 06:03 janousek

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

childish-sambino avatar Mar 05 '20 15:03 childish-sambino