Henrique Manduca133 downloadsFormat, minify, and manipulate JSON, JSONC, and JSON5 payloads with comments and flexible syntax support.
A powerful and lightweight JSON formatting, minification, and manipulation plugin for Obsidian.
Supports both standard strict JSON and flexible formats (comments, trailing commas, unquoted keys, hexadecimals) using dynamic parsing engines (JSONC and JSON5).
jsonc-parser): VS Code's parser that performs surgical AST-based formatting, preserving single-line (//) and multi-line (/* */) comments as well as trailing commas.json5): Serializes relaxed JSON5 syntax including unquoted keys, single-quoted strings, hexadecimals, and trailing commas.JSON: Format Selection: Formats the selected text in the active note.JSON: Format Block under Cursor: Automatically detects the surrounding ```json, ```jsonc, or ```json5 code block and formats its inner content while preserving Markdown fence delimiters.JSON: Minify Selection / Block: Strips whitespace and comments, producing compact machine-readable payloads. Supports selection or cursor-targeted block fallback.| Feature | JSONC (jsonc-parser) |
JSON5 (json5) |
|---|---|---|
Comments (//, /* */) |
Preserved intact via edits | Comments stripped on re-serialization |
| Unquoted Keys | No (strict key quotes) | Yes (e.g. { key: 1 }) |
| Single-Quoted Strings | No | Yes (e.g. 'string') |
| Hexadecimal / Infinity / NaN | No | Yes (e.g. 0xFF) |
| Trailing Commas | Yes | Yes |
JSON: Format Selection: Formats selected JSON text.JSON: Format Block under Cursor: Locates the enclosing Markdown JSON code block and formats it.JSON: Minify Selection / Block: Minifies selected JSON or the code block under the cursor.Open Settings -> Community Plugins -> JSON Toolkit:
JSONC or JSON5).# Install dependencies
npm install
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Build production bundle
npm run build
# Run complete quality checks
npm run check