I have a website, and most of the functionality is implemented using asp.net webapi. The problem is that some users have special keyboard layouts that have non-standard number characters, one is ۰۱۲۳۴۵۶۷۸۹ instead of 0123456789.
Now I need a way to customize asp.net webapi, or Json.Net to handle conversion of these strings to numbers.
I already know how to handle this, by implementing a JsonConverter
and decorate the Property with [JsonConverter]
attribute, but this is error prune, as one might forget to put this on new properties and this is an error which might easily slip through testing and creep to production code.
I need one global setting where I can handle this for all numerals types (even if I need to do that for each numeral separately).