JSON command line tools and utilities (WIP)
Concatenate JSON files
jsoncat concatenates multiple JSON files into a single array and prints out the output to the stdout. When a single JSON file is given, it does not add a top-level array. When no JSON file argument is given, it reads JSON from the stdin.
Compare two JSON files
jsoncmp reads two JSON files and compares them. It returns 0 if the two JSON files are equivalent (modulo formatting). It returns 1 otherwise. The return code of 2 indicates an error.
Print the first part of JSON files
jsonhead reads multiple JSON files and prints out the first 4 nodes of each JSON to the stdout, with the file name headers.
The -n
or --nodes
argument sets the number of nodes or elements of JSON to print out instead of 4.
When no JSON file is given, it reads JSON from the stdin.