From c305d55c7f321c01b4d135ef6d41879fd5f8e9f5 Mon Sep 17 00:00:00 2001 From: lijunlong Date: Tue, 10 Feb 2026 09:08:50 +0800 Subject: optimize: rename cjson.decoce_allow_comments to cjson.decocde_allow_comment. reslove two warnings and update the doc. --- tests/test.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test.lua') diff --git a/tests/test.lua b/tests/test.lua index 068a9f0..270f63a 100755 --- a/tests/test.lua +++ b/tests/test.lua @@ -334,8 +334,8 @@ local cjson_tests = { false, { "Expected value but found invalid unicode escape code at character 2" } }, -- Test comments - { 'Set decode_allow_comments(true)', - json.decode_allow_comments, { true }, true, { true } }, + { 'Set decode_allow_comment(true)', + json.decode_allow_comment, { true }, true, { true } }, { "Decode single-line comment", json.decode, { '{//comment\n}' }, true, { {} } }, { "Decode single-line comment with windows newline", @@ -356,8 +356,8 @@ local cjson_tests = { { "Decode comment inside number [throw error]", json.decode, { '{"a":1/*x*/0}' }, false, { "Expected comma or object end but found T_INTEGER at character 12" } }, - { 'Set decode_allow_comments(false)', - json.decode_allow_comments, { false }, true, { false } }, + { 'Set decode_allow_comment(false)', + json.decode_allow_comment, { false }, true, { false } }, -- Test indenting { 'Set encode_indent(" ")', -- cgit v1.2.3-55-g6feb