Instant JSON Path is a lightweight VS Code extension that lets you instantly copy the JSON path of the key under your cursor — no need to manually trace nested structures again!
✨ Features
🔍 Detects the JSON key at your current cursor position.
📋 Copies the full JSON path (e.g., user.profile.name) instantly to your clipboard.
🧠 Works seamlessly with both .json and .jsonc files.
🚫 Handles invalid cursor positions gracefully with helpful messages.
💬 Displays notifications for success, warnings, or errors.
🎥 Demo
Tip: Place your cursor on any key in a JSON file, then trigger the command “Instant JSON Path: Copy JSON Path” to copy the full key path.
⚡️ How It Works
Open any JSON or JSONC file in VS Code.
Move your cursor onto a key (e.g., "name").
Right-click on the key and select "Copy JSON Path" from the context menu.
✅ The full JSON path (e.g., user.profile.name) is instantly copied to your clipboard!
You’ll see a notification confirming the copied path.
Alternatively, you can use the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and run Instant JSON Path: Copy JSON Path.
If you right-click on whitespace or a value, you’ll get a helpful message prompting you to place the cursor on a key.