VSCode to open Json file formatting
When opening a JSON file in VSCode, you can use the following steps to format the JSON and display it as multiple lines:
-
Use shortcuts:
- In the open JSON file, use the shortcut keys to format the document.
- Windows/Linux:
Shift + Alt + F
- macOS:
Shift + Option + F
- Windows/Linux:
- In the open JSON file, use the shortcut keys to format the document.
-
Right-click menu:
- In the open JSON file, right-click and select "Format Document" or "Format Selection".
-
Command Panel:
- Open the Commands panel:
- Windows/Linux:
Ctrl + Shift + P
- macOS:
Cmd + Shift + P
- Windows/Linux:
- Enter "Format Document" and select the appropriate command.
- Open the Commands panel:
These methods will automatically format the JSON file so that it is displayed in a more readable multi-line format. If you only want to format a portion of the file, you can select the appropriate text and then execute the formatting command.
P.S. Command Formatting
This method is recommended when the JSON file is very large
For Mac/Linux users:
cat | python - >
For Windows users
type | python - >
summarize
To this article on the VSCode open Json file formatting article is introduced to this, more related VSCode open Json file formatting content, please search for my previous posts or continue to browse the following related articles I hope you will support me in the future more!