openresty / lua-cjson

Lua CJSON is a fast JSON encoding/parsing module for Lua
http://www.kyne.com.au/~mark/software/lua-cjson.php
MIT License
433 stars 118 forks source link

It's totally wrong to localize numbers. #90

Closed feraligatr closed 1 year ago

feraligatr commented 1 year ago

In json standard specification, numbers are "invariant culture", always using dot as decimal point. However in fpconv.c, fpconv_update_locale() is called to determine localized decimal point, that is totally wrong for json.

feraligatr commented 1 year ago

My fault.