VS Code extension to format JSON, JSONC, and JSONL/NDJSON for human-readability with consistent indentation and optional trailing newlines.
Why? Mainly for JSONL support. Existing VSCode JSON formatting extensions don't format JSONL well or don't validate it at all.
- Formats JSON, JSONC, and JSONL (line-delimited JSON) into a neatly indented, human-readable layout.
- Works through the built-in
Format Documentaction or theJSONExt: Format Documentcommand. - Respects
jsonext.indentSizeandjsonext.ensureFinalNewlinesettings for per-workspace control.
Open a JSON/JSONC/JSONL file and run Format Document, or invoke JSONExt: Format Document from the Command Palette.
Configure indentation and trailing newline behavior via jsonext.indentSize and jsonext.ensureFinalNewline in your settings.
- Build or download the VSIX (a packaged
jsonext-0.0.1.vsixlives at the repo root). - In VS Code, open the Command Palette and run
Extensions: Install from VSIX..., then pick the VSIX file. - Alternatively, install from a terminal:
code --install-extension /path/to/jsonext-0.0.1.vsix - Reload the window if prompted and the formatter will activate on JSON, JSONC, and JSONL files.
- Install dependencies:
npm install - Build the extension:
npm run compile - Run the test suite (after compiling):
npm test - Watch for rebuilds during development:
npm run watch - Package a new VSIX:
npm run package
License: MIT
Copyright: © Mike Bijon @mbijon, 2025