kgabis/parson

Number parsing broken for some locales

Closed this issue · 1 comments

Some locales use a comma as a decimal point. Others use the comma to separate thousands. In these cases the number parsing is broken if the value is not in double quotes, like this:

{
Num: 9,
Str: "something"
}

The strtod call should use the C locale, not the default one.

Per #98 (comment). There's no good way of fixing this. Use setlocale.