Skip to main content

JSON comments

Even though JSON standard does not support comments, this JSON parser is able to handle comments akin to those found in C programming language. Therefore, users can include comments for better documentation and readability without affecting the JSON's structure or the data's integrity.

The parser can recognize and properly ignore both // single-line comment and /* multi-line comment */ comments, allowing users to annotate their JSON files just like they would in a C source file.

{
// this is a single-line comment
"address": "0x12345678",
/*
this
is
a
multi-line
comment
*/
"file": "hello.world"
}