Page 1 of 1

Configure Zeus to Use jq to Pretty a Json File

Posted: Sun Aug 28, 2022 11:21 am
by jussij
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):

Code: Select all

C:\Users\<your user id>\AppData\Local\Programs\Zeus (x64)\zGNU\
Using jq to Pretty a Json File
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 Pretty: '$fn'
    Program Name: jq-win64.exe
       Arguments: . "$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
Using the New Tool
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" } ] }
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:

Code: Select all

{
  "folders": [
    {
      "name": "Project: Some Application",
      "path": "Application"
    },
    {
      "name": "Project: Other Lib",
      "path": "Library"
    }
  ]
}