parseAllowComments

Type: Boolean

The parseAllowComments property of the JadeJson class specifies whether comments are allowed when parsing JSON using the parseDynamic method. The default value is false.

If the value of the parseAllowComments property is set to true when parsing JSON using the parseDynamic method, JSON input with comments is accepted as valid. Comments are ignored by the parser and will not change the output of the method.

Comments can be specified using // for a single‑line comment or /* */ for a multi‑line comment. The following is an example of a valid JSON string with comments for the parseDynamic method.

{
    "prop1":"value1", // a single-line comment can be on the end of a line
    "prop2":"value2", /* a multi-line comment that can span across
    multiple lines*/
    "prop3": /* multi-line comments can appear in the middle of a line*/ "value3"
}

This allows Jade JSON to parse data compatible with the JSONC Specification. For detail, see https://jsonc.org/.

2025.0.01 and higher