lua-cjson icon indicating copy to clipboard operation
lua-cjson copied to clipboard

Lua CJSON is a fast JSON encoding/parsing module for Lua

Results 20 lua-cjson issues
Sort by recently updated
recently updated
newest added

Issue Description: When using the lua cjson library to encode Lua tables containing floating-point numbers with decimal places, the output JSON does not retain the decimal places as expected. Steps...

When `DEFAULT_ENCODE_KEEP_BUFFER` is 0, `strbuf_free` will cause Bus error or SIGSEGV. Please see the code below: ``` #define DEFAULT_ENCODE_KEEP_BUFFER 0 void strbuf_free(strbuf_t *s) { debug_stats(s); if (s->buf) { free(s->buf); s->buf...

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...

We've noticed the [luarocks package of lua-cjson](https://luarocks.org/modules/openresty/lua-cjson) has not been updated in some time: ![image](https://github.com/openresty/lua-cjson/assets/3277009/58762e26-2310-46cf-90c5-4bd79db0c150) I'm aware the most up-to-date version is bundled with OpenResty itself, but many projects (resty-related...

Here is the content of json file ``` { "1": "1", "2": "2", "3": "3", "4": "4" } ``` here is my code ``` local cjson = require "cjson" local...

CVE has revealed a a critical vulnerability about Redis,but details of the vulnerability are more related to cjson. By reviewing the Redis source code, the cjson library used in Redis...

environment: lua5.3 and lua-cjson 2.1.0.10-1 json file: cfg.json ``` { "server_ip": "192.168.1.100", "server_port": 10000, } ``` lua code: ``` local cjson = require("cjson.safe") local cfg_file_path = './cfg.json' local cfg_fd =...

This is a feature request. It would be awesome if lua-cjson could be pre-compiled when published via LuaRocks. I mean so that the cjson.so was compiled and published for the...

Hi, When using the decode API, is JSON injection something to be concerned about as a security threat?

Hello @leafo, @agentzh and @cloudwu! I just took #3 which has been open since 2015(!) and got it to a mergeable state, by reconciling the changes made in https://github.com/openresty/lua-cjson and...