2021-07-28 23:55:17 +03:00
|
|
|
# kennson
|
|
|
|
|
|
|
|
A terminal utility to pretty print JSON.
|
2021-07-29 00:05:22 +03:00
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
## Build instructions
|
|
|
|
|
|
|
|
Make sure you have [Dart](https://dart.dev/get-dart) installed, then run the following:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
dart compile exe bin/kennson.dart
|
|
|
|
```
|
|
|
|
|
|
|
|
The compiled executable will be inside the `bin` folder, named `kennson.exe` (regardless of platform).
|
2021-07-29 00:11:03 +03:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
```text
|
|
|
|
-f, --file=<filename> Read JSON from file instead of stdin
|
|
|
|
--input=<json input> Read JSON as parameter instead of stdin
|
2021-07-29 00:12:49 +03:00
|
|
|
--jsonpath=<JSONPath query> Display only the matches of the JSON document (also --path)
|
|
|
|
-p, --jsonpointer=<JSON Pointer> Display only the matches of the JSON pointer (also --pointer)
|
2021-07-29 00:11:03 +03:00
|
|
|
-i, --indent Set space indentation level (prefix with t for tab indentation)
|
|
|
|
(defaults to "2")
|
|
|
|
-d, --max-depth Specify maximum nesting before stopping printing
|
|
|
|
```
|
2021-07-29 00:15:54 +03:00
|
|
|
|
|
|
|
## TODO
|
|
|
|
|
|
|
|
- [ ] Configuration file
|
|
|
|
- [ ] Customisable colour scheme
|
|
|
|
- [ ] Default indent
|
|
|
|
|