ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Status Bar Json​Path

by Alex Kirk ST3

Sublime Text plugin to get the JSONPath under the cursor in a JSON

Details

Installs

  • Total 285
  • Win 104
  • Mac 141
  • Linux 40
Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15
Windows 0 1 0 1 0 1 0 0 1 1 0 2 1 0 0 2 1 0 3 1 0 0 1 2 2 2 0 3 0 1 0 0 0 2 2 1 1 0 0 0 1 0 0 0 1 0
Mac 2 0 0 2 0 0 4 1 2 0 0 0 1 1 0 2 1 0 2 0 0 0 2 1 0 0 1 1 1 2 0 0 2 1 2 1 3 0 0 1 3 1 0 0 0 0
Linux 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 2

Readme

Source
raw.​githubusercontent.​com

StatusBarJsonPath

Sublime Text plugin to get the JSONPath (a notation to access the item) under the cursor in a JSON.

The plugin also includes a command JSONPath: Copy to copy the displayed path to the clipboard.

Example

Given the following JSON object:

{
    "name": "Hello World",
    "tags": [
        "example"
    ],
    "metadata": {
        "author": "Alex Kirk"
    }
}

In this scenario the plugin will display/copy the following JSONPaths:

  • Cursor inside “name”: name
  • Cursor inside “Hello World”: name
  • Cursor inside “tags”: tags
  • Cursor inside “example”: tags[0]
  • Cursor inside “metadata”: metadata
  • Cursor inside “author”: metadata.author

Demo

screen recording

Installation

You can install the package manually like this (I have submitted it to https://packagecontrol.io/ but it has not been accepted yet):

  1. Click the Preferences >Browse Packages… menu, this should open a folder Packages.
  2. Download https://github.com/akirk/StatusBarJsonPath/archive/refs/heads/main.zip and extract it into that directory (it should then have a subfolder StatusBarJsonPath-main).
  3. Restart Sublime Text.