jsone — VS Code Extension
View and interact with jsone files directly in VS Code with a custom editor.
Features
- 📊 Table View — Automatically renders arrays of objects as interactive tables
- 🔍 Search — Client-side filtering across all visible data
- 🔄 Sortable Columns — Click column headers to sort ascending/descending
- 📋 Export to CSV — Copy table data as CSV with a single click
- 🌳 Tree View — Fallback JSON tree view for non-tabular data
- ⚡ Zero Configuration — Works out of the box
Installation
- Clone the jsone repository
- Install dependencies:
npm install
- Open the extension in VS Code development mode:
code extensions/vscode-jsone
- Press
F5 to run the extension
Usage
- Open any
.jsone or .json file in VS Code
- The jsone Table editor will open automatically
- Use the search box to filter rows
- Click column headers to sort
- Click "Copy CSV" to export visible data
Commands
jsone: Copy CSV — Copy table as CSV to clipboard
jsone: Toggle Columns — Show/hide columns
jsone: Toggle Tree View — Switch between table and tree view
Requirements
Development
From the extensions/vscode-jsone directory:
# Build TypeScript
npm run build
# Watch mode
npm run watch
# Prepare for publishing
npm run vscode:prepublish
Architecture
The extension uses a custom editor provider that:
- Loads
.jsone files
- Parses the content
- Renders tables using the jsone viewer library (
@jsone/core)
- Handles user interactions (search, sort, export)
- Listens for file changes and updates the view live
The viewer is embedded as a webview within VS Code, allowing it to use VS Code's theming and UI patterns.
Reuses @jsone/core
All table inference, flattening, and type detection is powered by the shared @jsone/core library.
| |