You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-20Lines changed: 26 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,21 @@
14
14
15
15
## Features
16
16
17
-
-quickly run JSONPath queries on your JSON files
18
-
-annotate and organize queries using [Markdown cells](#markdown-support)
19
-
-allows you to use a [different .json input file for each query](#switching-input-file-context)
20
-
-[open query result](#open-output) in a new document to save or further edit
17
+
-Quickly run JSONPath queries on your `.json` files
18
+
-Annotate and organize queries using [Markdown cells](#markdown-support)
19
+
-Use a [different .json input file for each query](#switching-input-file-context)
20
+
-[Open the query result](#open-output) in a new document to save or further edit
21
21
- 100% compliant with the JSONPath Standard [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535.html)
22
-
-store and share notebook files `.jsonpath-notebook`
23
-
-switch between standardcompliant syntax and [extended syntax](#extended-syntax)
22
+
-Store and share notebook files `.jsonpath-notebook`
23
+
-Switch between standard-compliant syntax and [extended syntax](#extended-syntax)
24
24
25
25
## Installation
26
26
27
27
Install the extension through the VS Code marketplace.
28
-
[https://marketplace.visualstudio.com/items?itemName=tschranz.jsonpath-notebook](https://marketplace.visualstudio.com/items?itemName=tschranz.jsonpath-notebook) or just search for `JSONPath Notebook` inside the Extension Pane.
Or just search for `JSONPath Notebook` inside the Extension Pane.
29
32
30
33
If you prefer not to use the Microsoft Marketplace you can also install the extension directly:
31
34
@@ -36,22 +39,21 @@ If you prefer not to use the Microsoft Marketplace you can also install the exte
36
39
37
40
### Creating a new Notebook
38
41
39
-
After installation a popup should appear, asking you to create a new notebook.
42
+
Right click in the file explorer and create a new file with an `.jsonpath-notebook` extension.
43
+
44
+
Or, open the Command Palette and run the command `JSONPath Notebook: Open new Notebook`.
40
45
41
-
You can also create a new notebook by using the command `JSONPath Notebook: Open new Notebook` or creating a file with the `.jsonpath-notebook` ending.
46
+
If you have an existing notebook file, you can just open it.
42
47
43
48

44
49
45
50
### Switching input file (context)
46
51
47
-
On the first execution of a cell, the input file is determined as follows
52
+
JSONPath Notebook tries to automatically figure out which `.json`input file you want the query to run on.
48
53
49
-
- by default the JSON file opened in the editor will be used
50
-
- if there is more than one JSON file opened in the editor, a popup appears asking to select a file
51
-
- there is also an option in this popup to select a file from the file system
52
-
- if there is no JSON file opened, a popup appears asking to select a file
54
+
If there is a single `.json` file open in the editor, it will be selected automatically. Otherwise, you will be asked to select a file.
53
55
54
-
The chosen context (input file) gets saved inside the notebook (per cell) and can be changed at any time by clicking on the corresponding button in the lower right of the cell.
56
+
The input filecan be changed for each cell by clicking on the corresponding button in the lower right of the cell.
@@ -70,11 +72,11 @@ JSONPath Notebook supports Markdown formatted cells. To add a new Markdown cell
70
72
71
73
### Extended Syntax Mode
72
74
73
-
JSONPath Notebook aims to be fully compliant with the JSONPath Standard [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535.html). However, some use cases may require functionality that is not part of the standard. JSONPath Notebook provides the ability to switch to an extended syntax mode, which supports additional functionality.
75
+
JSONPath Notebook aims to be fully compliant with the JSONPath Standard [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535.html). However, certain use cases may require additional functionality not included in the standard. JSONPath Notebook gives you the ability to switch to an extended syntax mode, which supports additional functionality.
74
76
75
77
Standard syntax mode allows only [standard-compliant](https://www.rfc-editor.org/rfc/rfc9535.html) JSONPath syntax. Extended syntax mode allows additional non-standard syntax, such as the keys selector operator `~` or the current key identifier `#`. Take a look at the [JSON P3 documentation](https://jg-rp.github.io/json-p3/guides/jsonpath-extra) for more information about the supported syntax.
76
78
77
-
The syntax mode can be changed for each notebook cell by clicking on the respective icon in the cell's status bar. The default setting can be changed in the [Settings](#default-syntax-mode).
79
+
Syntax mode can be changed for each notebook cell by clicking on the respective icon in the cell's status bar. The default setting can be changed in the [Settings](#default-syntax-mode).
@@ -140,15 +142,19 @@ See [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535) for the full JSONPath sta
140
142
141
143
### Use Relative Paths
142
144
143
-
When set to `true` the notebook will save the paths to input files relative to the location of the notebook file itself. This is particularly useful for sharing notebooks and input files as a package because it ensures that the links to input files will work on different machines and directories.
145
+
This setting determines how file paths are stored for each notebook cell that references an input file. When enabled, file paths are saved relative to the notebook's location. When disabled, absolute file paths are used instead.
146
+
147
+
Relative file paths are generally preferred because they make the notebook more portable. This allows you to move the notebook and input files together without breaking the file references.
148
+
149
+
Absolute file paths, on the other hand, contain the full path from the root directory. This can be useful if you want to reference files in specific, fixed locations, regardless of where the notebook is moved.
@@ -158,7 +164,7 @@ Sets the [default syntax](#extended-syntax-mode) mode for new notebook cells.
158
164
159
165
JSONPath Notebook uses the [json-p3](https://github.com/jg-rp/json-p3) JSONPath engine for querying JSON files. The engine implements the JSONPath standard as defined in [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535.html).
160
166
161
-
Before version 2.0 the extension used [brunerd's jsonpath engine](https://github.com/brunerd/jsonpath). That version did not implement the full JSONPath standard. Queries created with the old engine may need to be adjusted to work with the new engine.
167
+
Before version 2.0, the extension used [brunerd's jsonpath engine](https://github.com/brunerd/jsonpath). That version did not implement the full JSONPath standard. Queries created with the old engine may need to be adjusted to work with the new engine.
0 commit comments