Home Tip of the day - Show SharePoint Agent in JSON Format
Post
Cancel

Tip of the day - Show SharePoint Agent in JSON Format

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

  1. Open VS Code.
  2. Press Ctrl + Shift + P (or Cmd + Shift + P on macOS) to open the Command Palette.
  3. Type “Preferences: Open Settings (JSON)” and select it.
  4. 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:

  1. Open the .agent file.
  2. Press Shift + Alt + F (or Cmd + Shift + F on macOS)` to format the document.
  3. 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)

This post is licensed under CC BY 4.0 by the author.

Build a Declarative M365 Copilot Agent Using VS Code and Teams CLI

Tip of the day - Powershell for April first. Tricks and pranks Part 3