Skip to content

Reject trailing commas inside JSON arrays and objects#25491

Open
planetis-m wants to merge 2 commits intonim-lang:develfrom
planetis-m:patch-34
Open

Reject trailing commas inside JSON arrays and objects#25491
planetis-m wants to merge 2 commits intonim-lang:develfrom
planetis-m:patch-34

Conversation

@planetis-m
Copy link
Copy Markdown
Contributor

No description provided.

@planetis-m
Copy link
Copy Markdown
Contributor Author

nimlsp uses this JSON:

    const requestMessage = """{
        "jsonrpc": "2.0",
        "id": 100,
        "method": "something",
    }"""
    const notificationMessage = """{
        "jsonrpc": "2.0",
        "method": "something",
    }"""

Parser now rejects it.

@Araq
Copy link
Copy Markdown
Member

Araq commented Feb 13, 2026

What does that mean? Got it fixed already, not part of the CI?

@planetis-m
Copy link
Copy Markdown
Contributor Author

What does that mean? Got it fixed already, not part of the CI?

Right, I submitted a PR for nimlsp that fixed the above issue.

@Araq
Copy link
Copy Markdown
Member

Araq commented Feb 13, 2026

We should do this via a strict mode, I think not breaking code is more important than spec-compat when it's a pure "allows for more" derivation from the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants