vscode-yaml-plus-json
vscode-yaml-plus-json copied to clipboard
Support trailing comma
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"
.
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)
@qyurila in general I would highly consider anything the community requests 🙂 Will have a look at it. Otherwise pull requests are welcome as well.