aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorskewb1k <skewb1kunix@gmail.com>2026-02-10 03:59:11 +0300
committerGitHub <noreply@github.com>2026-02-10 08:59:11 +0800
commitfed8c8356be4d94ceb55f2880bdb77fd9b55ef1e (patch)
tree07a6044110a57d509da45f99ae0a80054386abc7 /README.md
parentea05d06f5a56d94d423fc697561a33ca3b8bf085 (diff)
downloadlua-cjson-fed8c8356be4d94ceb55f2880bdb77fd9b55ef1e.tar.gz
lua-cjson-fed8c8356be4d94ceb55f2880bdb77fd9b55ef1e.tar.bz2
lua-cjson-fed8c8356be4d94ceb55f2880bdb77fd9b55ef1e.zip
feature: add option to allow comments in decode.
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index d2094b1..233a094 100644
--- a/README.md
+++ b/README.md
@@ -262,3 +262,16 @@ cjson.encode(t) -- {"my_array":[]} properly re-encoded as an array
262``` 262```
263 263
264[Back to TOC](#table-of-contents) 264[Back to TOC](#table-of-contents)
265
266decode_allow_comments
267--------------------------
268**syntax:** `cjson.decode_allow_comments(enabled)`
269
270**default:** false
271
272If enabled, allows JavaScript-style comments in `cjson.decode` input. Comments
273are treated as whitespace and may appear anywhere whitespace is valid in JSON.
274Supports single-line comments beginning with '//' and block comments enclosed
275with '/* ... */'.
276
277[Back to TOC](#table-of-contents)