JSON Collapsed Count
A VS Code extension that shows the count of elements in collapsed JSON objects and arrays.
Features
- Displays the number of items when collapsing arrays
- Shows the number of keys when collapsing objects
- Works with both JSON and JSONC (JSON with comments) files
- Lightweight and fast
Usage
- Open a JSON or JSONC file in VS Code
- Collapse any object or array to see the count of its elements
- The count will appear next to the collapsed section
Configuration
You can enable/disable the extension by modifying the following setting:
"jsonCollapsedCount.enabled": true
Example
Before collapsing:
{
"users": [
{ "id": 1, "name": "John" },
{ "id": 2, "name": "Jane" },
{ "id": 3, "name": "Doe" }
]
}
After collapsing:
{
"users": [...] // 3 items
}
Installation
- Clone this repository
- Run
npm install
- Press F5 to start debugging
- The extension will be installed in the Extension Development Host instance of VS Code
License
MIT
| |