Skip to content

feat: support trailing commas #751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zirkelc
Copy link
Contributor

@zirkelc zirkelc commented Jul 15, 2025

Fixes #637

It's probably a philosophy question whether trailing commas should be supported: they are valid in JavaScript but not valid in JSON.

I encountered many cases where I removed a line from an JSONata expression but I forgot to remove the trailing comma in the previous line and encountered an error.
Such cases would usually be auto-fixed by the linter/formatter/IDE, but since we don't have built-in support for JSONata, I personally think trailing commas would be convenient to reduce such stylistic errors.

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.

Support for trailing commas
1 participant