mpx / lua-cjson

Lua CJSON is a fast JSON encoding/parsing module for Lua
https://kyne.au/~mark/software/lua-cjson.php
MIT License
936 stars 478 forks source link

maximum encode_number_precision value #80

Open rexxar-liang opened 2 years ago

rexxar-liang commented 2 years ago

for the latest code, I found the maximum value of encode_number_precision is 16, which is merged in commit. https://github.com/openresty/lua-cjson/commit/f79aa68af865ae84b36c7e794beedd87fef2ed54

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.