Open dheijl opened 10 years ago
Can I propose the following change in JsonReader.cs (adding numberformatinfo):
private void ProcessNumber (string number) { if (number.IndexOf ('.') != -1 || number.IndexOf ('e') != -1 || number.IndexOf ('E') != -1) { double n_double; if (Double.TryParse (number, NumberStyles.Any, NumberFormatInfo.InvariantInfo, out n_double)) { token = JsonToken.Double; token_value = n_double; return; } }
In European cultures the decimal point is a comma and vice versa.
Danny
Didn't see this here. A few of my users ran into the same issue, so I made pull request https://github.com/lbv/litjson/pull/37. Though my solution may be a bit overkill.
Can I propose the following change in JsonReader.cs (adding numberformatinfo):
In European cultures the decimal point is a comma and vice versa.
Danny