Files
zed/docs/src/languages/json.md
T
Miguel Raz Guzmán Macedo ded93ccb08 Fix typos and grammatical mistakes in docs (#59495)
# Objective

- Describe the objective or issue this PR addresses. -> ** Typo and
grammar fixes!**

## Solution


## Testing

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

---

Release Notes:

- N/A
2026-07-08 12:32:00 +00:00

3.1 KiB

title, description
title description
JSON Configure JSON language support in Zed, including language servers, formatting, and debugging.

JSON

JSON support is available natively in Zed.

JSONC

Zed also supports a super-set of JSON called JSONC, which allows single line comments (//) in JSON files. While editing these files you can use cmd-/ (macOS) or ctrl-/ (Linux) to toggle comments on the current line or selection.

JSONC Prettier Formatting

If you use files with the *.jsonc extension when using Format Document or have format_on_save enabled, Zed invokes Prettier as the formatter. Prettier has an outstanding issue where it will add trailing commas to files with a jsonc extension. JSONC files which have a .json extension are unaffected.

To workaround this behavior you can add the following to your .prettierrc configuration file:

{
  "overrides": [
    {
      "files": ["*.jsonc"],
      "options": {
        "parser": "json",
        "trailingComma": "none"
      }
    }
  ]
}

JSON Language Server

Zed automatically out of the box supports JSON Schema validation of package.json and tsconfig.json files, but json-language-server can use JSON Schema definitions in project files, from the JSON Schema Store or other publicly available URLs for JSON validation.

Inline Schema Specification

To specify a schema inline with your JSON files, add a $schema top level key linking to your json schema file.

For example, for a .luarc.json for use with lua-language-server:

{
  "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
  "runtime.version": "Lua 5.4"
}

Schema Specification via Settings

You can associate JSON Schemas with file paths using relative paths in your language server settings. Zed resolves paths relative to your project root:

"lsp": {
  "json-language-server": {
    "settings": {
      "json": {
        "schemas": [
          {
            "fileMatch": ["config/*.json"],
            "url": "./schemas/custom-schema.json"
          },
          {
            "fileMatch": ["*.config.json"],
            "url": "~/global-schemas/shared.json"
          },
          {
            "fileMatch": ["*/*.luarc.json"],
            "url": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json"
          }
        ]
      }
    }
  }
}

Paths starting with ./ resolve relative to the worktree root. Paths starting with ~/ expand to your home directory.

You can also pass any of the supported settings to json-language-server by specifying them in your Zed settings.json: