From f79aa68af865ae84b36c7e794beedd87fef2ed54 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 1 Nov 2015 01:51:30 -0700 Subject: feature: now we allow up to 16 decimal places in JSON number encoding via cjson.encode_number_precision(). thanks lordnynex for the patch in #4. Test cases for changing precision --- lua_cjson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua_cjson.c') diff --git a/lua_cjson.c b/lua_cjson.c index 97f2350..5ff3bf7 100644 --- a/lua_cjson.c +++ b/lua_cjson.c @@ -299,7 +299,7 @@ static int json_cfg_encode_number_precision(lua_State *l) { json_config_t *cfg = json_arg_init(l, 1); - return json_integer_option(l, 1, &cfg->encode_number_precision, 1, 14); + return json_integer_option(l, 1, &cfg->encode_number_precision, 1, 16); } /* Configures how to treat empty table when encode lua table */ -- cgit v1.2.3-55-g6feb