JSON/JSONC Code Formatter

Supports:

  • JSON
  • JSONC (JSON with comments)

Install and Setup

In dprint.config.json:

  1. Specify the plugin url in the "plugins" array.
  2. Ensure .json file extensions are matched in an "includes" pattern.
  3. Add a "json" configuration property if desired.
{
    // omitted...
    "json": {
        // json config goes here
    },
    "plugins": [
        "https://plugins.dprint.dev/json-x.x.x.wasm"
    ]
}

Configuration

See Configuration

Playground

See Playground