[json] add commas automatically
See original GitHub issueTest case
Expected behavior
- After typing
age
<kbd>TAB</kbd>, the comma should be added to the end of the previous line. - After typing
"
for the next object property, the comma should be added to the end of the previous line.
Actual behavior
The autocomplete does not produce valid text.
Discussion
In general, the autocomplete should strive to produce output that is maximally valid in whatever language grammar it is using.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:16
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Add commas to list of JSON object - Stack Overflow
5 Answers 5 ; 3 · A sloppy but simple solution in Python: import json tmp = '{ "a" · "1" ; 1...
Read more >Auto Insert Comma - Visual Studio Marketplace
Automatically insert JSON /javascript Object comma. ... Launch VS Code Quick Open ( Ctrl+P ), paste the following command, and press enter. Copy....
Read more >How do add comma between two json objects when saving ...
Hello, This is how you will do this. JavaScript. function createData() { //original, single json object var dataToSave = {"result": '"' + ...
Read more >Extra comma and line break added when formatting JSON ...
WEB-43410 JSON formatting adds trailing commas if "Insert missing commas on ... Run auto-formatting (Opt+Cmd+L) ... A line break is added after the...
Read more >Trailing commas - JavaScript - MDN Web Docs
Trailing commas (sometimes called "final commas") can be useful when adding new elements, parameters, or properties to JavaScript code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s most annoying when you add a { and VS Code auto adds the } at the end.
I get in this situation all the time:
It’s very common in Vue’s option syntax for example.
Got it @zardoy, I have updated the expected behavior above and added another behavior that doesn’t require auto complete