Use ALT-SHIFT-F
to auto format a json file in windows
Press Ctrl-Shift-p to format the documents. I don't know if this shortcut works on Windows, but it does on Linux.
Install a code formatting extension then save the file.
Install Prettier using the extensions, and then right click, select format document with and pick Prettier.
Open the json file and SHIFT
+ OPTION
+ F
for mac
In 2022 it's Ctrl+Shift+I
as stated on the Visual Studio Code website .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.