% CONVERT-JSON(1) Version 3.0.1 | Scripts Documentation % Georg Voell - georg.voell@oracle.com % (c)2020 Oracle NAME ==== **convert-json** - (TCSH Script) Reads a JSON file and converts it to a human readable file. SYNOPSIS ======== | **convert-json** \[_options_] \[_filename_] DESCRIPTION =========== Reads a JSON file and converts it to a human readable file. Options ------- -h, \--help          : Displays helptext. -v, \--version          : Displays the version of the script. -n, \--noheader          : Don't write a header (needed for concatenating files) in output "text". -s, \--strict          : Analyze JSON strictly. It takes more time but finds more errors in JSON. -o, \--output _string_         : Output format: _string_ can be "list" (default), "json", "text" or "table". -f, \--fields _string_         : Select the fields you want to convert. Use a comma separated string for fields. Filename ------- Optional - if not specified, read from stdin. EXAMPLES ======== get-platform \--output json | **convert-json** : Converts JSON output from get-platform into a vertical list format. get-platform \--output json | **convert-json** --fields "pretty_name,machine,bit" --output table : pretty_name machine bit : ---------------------- ------- --- : macOS 10.14.6 (Mojave) x86_64 64 EXIT CODES ========== 01: Unknown or wrong parameter. 02: **jq** not found. This script needs **jq** to perform. 03: JSON error. 04: Key in JSON contains dash ("-") or blank. **jq** does not work here. 05: JSON does not start with "{". 06: JSON contains less then 2 lines. 07: **jq** join error. 99: User interrupt. SEE ALSO ======== **print-table**(1), **install-scripts**(1)