JSON Dot Search
A VSCode extension that provides enhanced JSON search functionality using dot notation.
Features
- Dot Notation Search: Search for nested JSON properties using dot notation (e.g.,
foo.bar )
- Smart Navigation: Automatically navigate to found properties in your JSON files
- Multiple Results: Handle multiple matches with a quick pick menu
- Context-Aware: Only activates for JSON and JSONC files
Usage
Method 1: Command Palette
- Open a JSON file in VSCode
- Press
Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the command palette
- Type "Search JSON with Dot Notation" and select the command
- Enter your dot notation query (e.g.,
foo.bar )
Method 2: Keyboard Shortcut
- Open a JSON file in VSCode
- Press
Ctrl+Shift+F (or Cmd+Shift+F on Mac)
- Enter your dot notation query
- Right-click in a JSON file
- Select "Search JSON with Dot Notation" from the context menu
- Enter your dot notation query
Examples
Given this JSON:
{
"user": {
"profile": {
"name": "John Doe",
"email": "john@example.com"
},
"settings": {
"theme": "dark"
}
},
"config": {
"debug": true
}
}
You can search for:
user.profile.name → finds "John Doe"
user.settings.theme → finds "dark"
config.debug → finds true
profile.email → finds "john@example.com" (partial path matching)
Installation
From Source
- Clone or download this repository
- Open the folder in VSCode
- Run
pnpm install to install dependencies
- Run
pnpm run compile to compile the TypeScript
- Press
F5 to launch a new Extension Development Host window
- Test the extension in the new window
Building VSIX Package
- Install
vsce : npm install -g vsce
- Run
vsce package to create a .vsix file
- Install the extension using
code --install-extension json-dot-search-0.0.1.vsix
Requirements
Known Issues
- The extension currently uses a simple heuristic for path matching that may occasionally produce false positives in very complex JSON structures
- Only works with valid JSON files (syntax errors will prevent searching)
Release Notes
0.0.1
- Initial release
- Basic dot notation search functionality
- Support for JSON and JSONC files
- Multiple result handling with quick pick menu
| |