Skip to content

MaloPolese/copy-json-path

Repository files navigation

Copy Json Path

Super Linter Last Commit Last Commit GitHub Issues Last Commit

GitHub Issues GitHub GitHub

This extension allows you to copy and paste a jsonpath

Install

  1. Install extension from Visual Studio Marketplace or Open VSX Registry
  2. Enjoy

Usage

  1. Open a json file
  2. Click on any key in the file
  3. Ctrl+Maj+p write Copy json path and Enter

Showcase

Showcase 1

Configuration

Bracket notation

If you want to use bracket notation instead of dot notation, you can set the copy-json-path.bracketNotation setting to true.

Bracket notation setting

File name

If you want to add the file name at the beginning of the path, you can set the copy-json-path.includeFileName setting to true.

File name setting

Quotes

When you use the bracket notation the key is surrounded by quotes. With the copy-json-path.quote setting you can choose the type of quotes to use Single or Double. The default value is Double.

Quote setting

Output

If you want to change the output format, you can change the copy-json-path.output setting.

Output setting

The default output is only the json path represented by the %PATH% variable.

For example, you can change it as follows: Output html

and the result in your clipboard will be : <TMPL_VAR NAME="path.to.key">