Tip of the day: Show SharePoint Agent in JSON Format
Goal: Show SharePoint Agent .agent files in JSON Format
Using VS Code
Associate the .agent extension with JSON
- Open VS Code.
- Press
Ctrl + Shift + P
(orCmd + Shift + P on macOS
) to open the Command Palette. - Type “
Preferences: Open Settings (JSON)
” and select it. - Add the following entry inside the settings JSON:
1
2
3
"files.associations": {
"*.agent": "json"
}
Enable JSON Formatting
Once VS Code recognizes .agent files as JSON:
- Open the .agent file.
- Press
Shift + Alt + F
(orCmd + Shift + F on macOS
)` to format the document. - You can also right-click inside the editor and select Format Document.
Install a JSON Formatter (If Needed)
If formatting doesn’t work, install an extension like: Prettier - Code formatter (recommended)