A terminal utility to pretty print JSON
Find a file
2021-12-03 12:27:40 +02:00
bin Modified --jsonpath help string 2021-12-03 12:27:40 +02:00
.gitignore First kennson version 2021-07-28 23:55:17 +03:00
analysis_options.yaml First kennson version 2021-07-28 23:55:17 +03:00
CHANGELOG.md First kennson version 2021-07-28 23:55:17 +03:00
pubspec.lock First kennson version 2021-07-28 23:55:17 +03:00
pubspec.yaml First kennson version 2021-07-28 23:55:17 +03:00
README.md Modified --jsonpath help string 2021-12-03 12:27:40 +02:00
screenshot.png Added screenshot and build instructions 2021-07-29 00:05:22 +03:00

kennson

A terminal utility to pretty print JSON.

Screenshot showing kennson pretty printing a JSON file

Build instructions

Make sure you have Dart installed, then run the following:

dart pub get
dart compile exe bin/kennson.dart

The compiled executable will be inside the bin folder, named kennson.exe (regardless of platform).

Parameters

-f, --file=<filename>               Read JSON from file instead of stdin
    --input=<json input>            Read JSON as parameter instead of stdin
    --jsonpath=<JSONPath query>     Display only the matches of the JSON path (also --path)
-p, --jsonpointer=<JSON Pointer>    Display only the matches of the JSON pointer (also --pointer)
-i, --indent                        Set space indentation level (prefix with t for tab indentation)
                                    (defaults to "2")
-d, --max-depth                     Specify maximum nesting before stopping printing

TODO

  • Configuration file
  • Customisable colour scheme
  • Default indent