Skip to content

Tolerate trailing commas in jsonc format #102061

@alexreg

Description

@alexreg

Would it be possible to add tolerance for trailing commas to the jsonc (JSON With Comments) format? Even as an optional setting that is off by default. While I can understand not adding support to the json (spec-compliant) format, there doesn't seem to be a good reason not to add it (either on automatically or configurable) to jsonc.

In case there's any doubt over what I mean, here's an example.

{
    "foo": 123,
    "bar": [
        "abc",
        "def",
        "ghi", // trailing comma: okay!
    ], // trailing comma: okay!
}

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions