Skip to content

Commit 0a9c22f

Browse files
committed
tidy up readme
1 parent 3ec1516 commit 0a9c22f

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@
1414

1515
## Features
1616

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
2121
- 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 standard compliant 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)
2424

2525
## Installation
2626

2727
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.
28+
29+
[https://marketplace.visualstudio.com/items?itemName=tschranz.jsonpath-notebook](https://marketplace.visualstudio.com/items?itemName=tschranz.jsonpath-notebook)
30+
31+
Or just search for `JSONPath Notebook` inside the Extension Pane.
2932

3033
If you prefer not to use the Microsoft Marketplace you can also install the extension directly:
3134

@@ -36,22 +39,21 @@ If you prefer not to use the Microsoft Marketplace you can also install the exte
3639

3740
### Creating a new Notebook
3841

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`.
4045

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.
4247

4348
![Creating a new Notebook Showcase](./images/create-notebook.gif)
4449

4550
### Switching input file (context)
4651

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.
4853

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.
5355

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 file can be changed for each cell by clicking on the corresponding button in the lower right of the cell.
5557

5658
![Switching input file Showcase](./images/context.gif)
5759

@@ -70,11 +72,11 @@ JSONPath Notebook supports Markdown formatted cells. To add a new Markdown cell
7072

7173
### Extended Syntax Mode
7274

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.
7476

7577
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.
7678

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).
7880

7981
![Extended Syntax Showcase](./images/extended-syntax.gif)
8082

@@ -140,15 +142,19 @@ See [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535) for the full JSONPath sta
140142

141143
### Use Relative Paths
142144

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.
144150

145151
| Setting ID | Options | Default |
146152
|------------------------------------|------------------| ------- |
147153
|`jsonpath-notebook.useRelativePaths`| `true` or `false`| `true` |
148154

149155
### Default Syntax Mode
150156

151-
Sets the [default syntax](#extended-syntax-mode) mode for new notebook cells.
157+
Sets the default [syntax mode](#extended-syntax-mode) for new notebook cells.
152158

153159
| Setting ID | Options | Default |
154160
|-------------------------------------|--------------------------------------|-----------------|
@@ -158,7 +164,7 @@ Sets the [default syntax](#extended-syntax-mode) mode for new notebook cells.
158164

159165
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).
160166

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.
162168

163169
## Release Notes
164170

0 commit comments

Comments
 (0)