An open API service indexing awesome lists of open source software.

https://github.com/zircote/json-lsp

Claude Code plugin for JSON development with vscode-json-languageserver and schema validation
https://github.com/zircote/json-lsp

claude-code-plugin code-quality json lsp schema

Last synced: 9 days ago
JSON representation

Claude Code plugin for JSON development with vscode-json-languageserver and schema validation

Awesome Lists containing this project

README

          

# json-lsp

[![Version](https://img.shields.io/badge/version-0.1.0-blue.svg)](CHANGELOG.md)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Claude Plugin](https://img.shields.io/badge/claude-plugin-orange.svg)](https://docs.anthropic.com/en/docs/claude-code/plugins)
[![Marketplace](https://img.shields.io/badge/marketplace-zircote--lsp-purple.svg)](https://github.com/zircote/lsp-marketplace)
[![JSON](https://img.shields.io/badge/JSON-000000?logo=json&logoColor=white)](https://www.json.org/)

A Claude Code plugin providing comprehensive JSON development support through:

- **vscode-json-language-server** integration for IDE-like features
- **Automated hooks** for validation and formatting
- **JSON ecosystem** integration (jq, prettier)

## Quick Setup

```bash
# Run the setup command (after installing the plugin)
/setup
```

Or manually:

```bash
# Install vscode-json-language-server
npm install -g vscode-langservers-extracted

# Install development tools
brew install jq
npm install -g prettier
```

## Features

### LSP Integration

The plugin configures vscode-json-language-server for Claude Code via `.lsp.json`:

```json
{
"json": {
"command": "vscode-json-language-server",
"args": ["--stdio"],
"extensionToLanguage": {
".json": "json",
".jsonc": "jsonc"
},
"transport": "stdio"
}
}
```

**Capabilities:**
- Schema validation
- Hover documentation
- Code completion
- Document outline
- Real-time diagnostics
- JSON Schema support

### Automated Hooks

| Hook | Trigger | Description |
|------|---------|-------------|
| `jq-validate` | `**/*.json` | JSON syntax validation |
| `prettier` | `**/*.json` | Formatting |
| `json-todo-fixme` | `**/*.json` | Surface TODO/FIXME comments |

## Required Tools

| Tool | Installation | Purpose |
|------|--------------|---------|
| `vscode-json-language-server` | `npm i -g vscode-langservers-extracted` | LSP server |
| `jq` | `brew install jq` | JSON validation & processing |
| `prettier` | `npm i -g prettier` | Formatting |

## Project Structure

```
json-lsp/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata
├── .lsp.json # vscode-json-language-server configuration
├── commands/
│ └── setup.md # /setup command
├── hooks/
│ ├── hooks.json # Hook definitions
│ └── scripts/
│ └── json-hooks.sh
├── tests/
│ └── sample.json # Test file
├── CLAUDE.md # Project instructions
└── README.md # This file
```

## License

MIT