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

Support trailing comma #50

Open
martolini opened this issue May 21, 2022 · 2 comments
Open

Support trailing comma #50

martolini opened this issue May 21, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request feature

Comments

@martolini
Copy link

martolini commented May 21, 2022

Is your feature request related to a problem? Please describe.
When I'm working in python and typescript, a common code convention when writing "json-like" objects is to have trailing commas, i.e;

service = {
    "apiVersion": "v1",
    "kind": "Service",
    "metadata": {"name": "service"},
    "spec": {
        "ports": [{"port": 80, "targetPort": 8000}],
    },
}

This is typically preferred in loads of prettier/black setups.

Describe the solution you'd like
It would be excellent if this plugin also handled that input instead of "an error occurred converting content from json".

@martolini martolini added enhancement New feature or request feature labels May 21, 2022
@qyurila
Copy link

qyurila commented Jun 20, 2022

JSON5 accpts trailing comma (as well as comments etc.)

Because It's one of the promissing data interchange formats and very similar to JSON, I think it's an option worth to considering to implement, but only if the owner is positively considering to introduce 'JSON with Comments' format support. (#18)

@hilleer
Copy link
Owner

hilleer commented Jun 20, 2022

@qyurila in general I would highly consider anything the community requests 🙂 Will have a look at it. Otherwise pull requests are welcome as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

No branches or pull requests

3 participants