Configure Zeus to Use jq to Validate a Json File
Posted: Sun Aug 28, 2022 11:04 am
Installation
1. Download the Windows version of the jq executable found here: https://stedolan.github.io/jq/download/
2. Copy that executable to this Zeus folder location (change the folder to match the user id):
Using jq to Check a File Using a Tool
Use the Options, Document Types menu and edit the JScript Document Type.
In the Tools Section add the following tool:
Using the New Tool
1. Open the following c:\temp\test.json test file:
2. With that file open in Zeus and as the active use the Tools menu to run the jq Validate tool.
3. This will result in the following output:
3. Using the mouse double click on that error to be taken to the location in the file were the error will be found. Remove the errant ',' found on that line and re run the tool to find no other errors are reported.
1. Download the Windows version of the jq executable found here: https://stedolan.github.io/jq/download/
2. Copy that executable to this Zeus folder location (change the folder to match the user id):
Code: Select all
C:\Users\<your user id>\AppData\Local\Programs\Zeus (x64)\zGNU\
Use the Options, Document Types menu and edit the JScript Document Type.
In the Tools Section add the following tool:
Code: Select all
Menu Text: jq Validate: '$fn'
Program Name: jq-win64.exe
Arguments: empty "$f"
Work Directory: $fdd
(o) Executable
(o) Run hidden
(o) Display on output
[x] Capture stdout
[x] Capture stderr
[ ] Allow user input
[x] Save current document before running
[x] Add to popup menu
1. Open the following c:\temp\test.json test file:
Code: Select all
{
"folders": [
{
"name": "Project: Some Application",
"path": "Application"
},
{
"name": "Project: Other Lib",
"path": "Library"
},
]
}
3. This will result in the following output:
Code: Select all
parse error: Expected another array element at line 11, column 3