English | 简体中文
JSON Path Hover for VS Code
A lightweight VS Code extension to show and copy the current JSON path in JSON and JSONC files.

Features
- Hover any JSON or JSONC property or array item to see its access path.
- Click
Copy in the hover to copy the path to the clipboard.
- Works in common VS Code config files such as
settings.json, launch.json, and keybindings.json.
- Special keys are escaped when needed, for example
["@antfu/eslint-config"].
Example
For this JSON:
{
"user": {
"profile": {
"display-name": "Simon"
}
},
"items": [
{
"id": 1
}
]
}
The extension shows paths like:
user.profile['display-name']
items[0].id
Usage
- Open a
.json or .jsonc file in VS Code.
- Move the cursor over a property or array item.
- Use the hover action to copy the current path.
Notes
- The extension works on valid JSON and JSONC documents.
- While a file is temporarily invalid during editing, the hover is hidden until the document parses again.
Support
Buy me a cup of coffee
License
MIT
| |