JSON/JSONC Code Formatter

Supports:

  • JSON
  • JSONC (JSON with comments)

Install and Setup

In your project's directory with a dprint.json file, run:

dprint config add json

This will update your config file to have an entry for the plugin. Then optionally specify a "json" property to add configuration:

{
  "json": {
    // json config goes here
  },
  "plugins": [
    "https://plugins.dprint.dev/json-x.x.x.wasm"
  ]
}

Configuration

See Configuration

Playground

See Playground