From fed8c8356be4d94ceb55f2880bdb77fd9b55ef1e Mon Sep 17 00:00:00 2001 From: skewb1k Date: Tue, 10 Feb 2026 03:59:11 +0300 Subject: feature: add option to allow comments in decode. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'README.md') 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 ``` [Back to TOC](#table-of-contents) + +decode_allow_comments +-------------------------- +**syntax:** `cjson.decode_allow_comments(enabled)` + +**default:** false + +If enabled, allows JavaScript-style comments in `cjson.decode` input. Comments +are treated as whitespace and may appear anywhere whitespace is valid in JSON. +Supports single-line comments beginning with '//' and block comments enclosed +with '/* ... */'. + +[Back to TOC](#table-of-contents) -- cgit v1.2.3-55-g6feb