Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime text 3 plugin to get JSON path

I am after a plugin or technique in sublime text 3 to get what I will call the fully qualified path of the json element that is selected in the editor window.

Somethink like: http://jsonpath.com/

I want to get a result somewhere that I can copy, I just want to use this for documentation, not programmatically. It does not need to be the https://github.com/jayway/JsonPath standard, just something that produces a readable/meaningful path to an element.

like image 591
MattG Avatar asked May 25 '16 01:05

MattG


People also ask

Does Sublime Text support JSON?

Syntax of Sublime Pretty JSONSublime Text is an easy option to Pretty format JSON, also we can prettyify JSON in our browser. Based on OS, installation steps might change a bit. If MAC OS, press CMD+SHIFT+P, then select 'Install Package'. Search for 'Pretty JSON' and install.

What is JSON Path Finder?

This tool will help you find all available JSONPaths in a JSON document, view them in an object tree, identify the different input expressions and extract the matching piece of JSON data against the input expression.


2 Answers

I was searching for the same and ended up creating a plugin myself: https://github.com/akirk/StatusBarJsonPath

screenrecording of StatusBarJsonPath

like image 85
akirk Avatar answered Oct 02 '22 16:10

akirk


For those who came here looking for ST3 implementation of jsonpath, there's an awesome Pretty JSON plugin.

enter image description here

It has jQ integration, which does the same same thing as jsonpath. jQ has different syntax, but it's much more convenient to have this functionality available inside ST3 than to switch to browser.

like image 20
voiger Avatar answered Oct 02 '22 14:10

voiger