textproc/jshon 20180209_1 DragonFly
JSON parser for the shell
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- MIT
- Categories
- textproc
- Package size
- 14.2 KiB, 27.3 KiB installed
Description
Jshon parses, reads and creates JSON. It is designed to be as usable as possible from within the shell and replaces fragile ad hoc parsers made from grep/sed/awk as well as heavyweight one-line parsers made from perl/python.
Jshon loads JSON text from stdin, performs actions, then displays the last action on stdout. Some of the options output JSON, others output plain text meta information. Because Bash has very poor nested data structures, Jshon does not try to return a native bash data structure as a typical library would. Instead, Jshon provides a history stack containing all the manipulations.
The big change in the latest release is switching the everything from pass-by-value to pass-by-reference. In a typical use case (processing AUR search results for 'python') by-ref is twice as fast and uses one sixth the memory. If you are editing JSON, by-ref also makes your life a lot easier as modifications do not need to be manually inserted through the entire stack.
In the other systems
| System | Port | Version |
|---|---|---|
| DragonFly | textproc/jshon | 20180209_1 |
| FreeBSD | textproc/jshon | 20180209_1 |
| HardenedBSD | textproc/jshon | 20180209_1 |
| GhostBSD | textproc/jshon | 20180209_1 |
Install
Binary package:
pkg install jshon
From DPorts:
cd /usr/dports/textproc/jshon && make install clean
Dependencies
Run dependencies 1
No port depends on this one.