Open rexxar-liang opened 2 years ago
From here, it seems the lua_cjson only support double type, and do not support int64 or uint64. https://github.com/openresty/lua-cjson/blob/master/lua_cjson.c#L662
Do we have any plan to support larger number? the lua_number in lua5.4 can be long double.
Sample problem here. We are using Long type in java, and cjson cannot decode it correctly
因为luajit number 类型不能表示int64,可以使用字符串进行处理
for the latest code, I found the maximum value of encode_number_precision is 16, which is merged in commit. openresty@f79aa68
For our scenes, we use int64 value in json strings, which means 16 precission numbers is not enough for us.
So any suggestions? Can we change max value of encode_number_precision to 19, 20 or add new configuration like cjson.max_encode_number_precision(X) for different scenes?
Thanks.