aboutsummaryrefslogtreecommitdiff
path: root/tests/agentzh.t (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feature: Lua 5.3 + 5.4 integer support, with CI and conflicts fixed.Hisham Muhammad2024-06-111-0/+42
| | | | | | | | | | Co-Authored-By: Hisham Muhammad <hisham@gobolinux.org> Co-authored-by: Mark Pulford <mark@kyne.com.au> Co-authored-by: ichenq <ichenq@gmail.com> Co-authored-by: Cloud Wu <cloudwu@gmail.com> Co-authored-by: caijietao <t0350.prog@gmail.com> Co-authored-by: actboy168 <actboy168@gmail.com> Co-authored-by: wudeng <wudeng256@gmail.com> Co-authored-by: caiyiheng <rangercyh@qq.com>
* feature: Add option to skip invalid value types. lijunlong2023-02-221-0/+26
| | | Co-authored-by: Jesper Lundgren <jesperlundgren@exosite.com>
* write sort_json, use it on perl tests to prevent hash table ordering failuresleaf corcoran2020-04-251-5/+8
|
* feature: add option to disable forward slash escaping2.1.0.8rc12.1.0.8Jesper Lundgren2020-03-241-0/+19
| | | | Thanks @spacewander for optimization and documentation.
* feature: set cjson.array_mt on decoded JSON arrays.2.1.0.6rc1Thibault Charbonnier2017-11-171-6/+55
| | | | | | | this can be turned on via cjson.decode_array_with_array_mt(true). off by default. Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
* feature: added new cjson.array_mt metatable to allow enforcing JSON array ↵Thibault Charbonnier2017-11-151-4/+75
| | | | | | encoding. Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
* tests: now we use luajit to run the test suite.Yichun Zhang (agentzh)2017-11-151-0/+3
|
* bugfix: preserve 'empty_array_mt' behavior upon multiple loadings of the module.Thibault Charbonnier2016-12-171-2/+26
| | | | | | | | | | | | | Prior to this fix, when the module would be loaded several times (by-passing `package.loaded`), the `lua_cjson_new` function would override the `empty_array_mt` table in the registry with a new one. Comparison for equality between those tables would then fail, and the behavior would be broken. This was discovered after loading `cjson` *and* `cjson.safe` in the same application, resulting in two calls to `lua_cjson_new`. Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
* feat: cjson.as_array metamethod to enforce empty array encodingThibault Charbonnier2016-03-031-2/+74
| | | | | | | | | | | | | | A proposed improved patch of openresty/lua-cjson#1 (a patch commonly proposed to lua-cjson and its forks), taking into considerations comments from the original PR. - use a lightuserdata key to store the metatable in the Lua Registry (more efficient and avoiding conflicts) - provide a lightuserdata resulting in empty arrays as well - tests cases moved to t/agentzh.t, where cases for 'encode_empty_table_as_object' are already written. It seems like a better place for tests specific to the OpenResty fork's additions. - a more complex test case
* feature: now we allow up to 16 decimal places in JSON number encoding via ↵2.1.0.3Brandon2015-11-041-0/+15
| | | | | | | | cjson.encode_number_precision(). thanks lordnynex for the patch in #4. Test cases for changing precision
* added one passing test.Yichun Zhang (agentzh)2014-03-311-0/+11
|
* feature: applied Jiale Zhi's patch to add the new config function ↵2.1.0.1Yichun Zhang (agentzh)2014-02-181-0/+41
encode_empty_table_as_object so that we can encode empty Lua tables into empty JSON arrays.