Skip to content
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

comments before comma marked invalid #4

Open
RodolpheGohard opened this issue Jul 1, 2019 · 3 comments · May be fixed by #7
Open

comments before comma marked invalid #4

RodolpheGohard opened this issue Jul 1, 2019 · 3 comments · May be fixed by #7

Comments

@RodolpheGohard
Copy link

I have this strange behaviour with comments :

{
  "field": value"
  // This comment is not tolerated and marked as invalid
}
{
  "field": value",
  // This comment is tolerated, mind the comma. (same with multiline)
}

I feel that both should be valid syntax, but it's not clear to me from the main json5 page as it says "Single and multi-line comments are allowed."

@DarthFutuza
Copy link

Isn't your value in your example missing an opening quotation mark? eg: "value" vs value"?

@ralfhandl
Copy link

I have detected the same issue (and with all quotes in place 😄 ):

image

Would be nice if comments before a comma were also correctly recognized. The red color is somewhat distracting.

@ralfhandl ralfhandl linked a pull request Mar 12, 2021 that will close this issue
@chaeron
Copy link

chaeron commented Jan 14, 2023

Any chance this will be resolved (pull req merged) any time soon?

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 a pull request may close this issue.

4 participants