textproc/jshon 20180209_1 FreeBSD
JSON parser for the shell
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- License
- MIT
- Categories
- textproc
- Package size
- 16.5 KiB, 30.2 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 |
|---|---|---|
| FreeBSD | textproc/jshon | 20180209_1 |
| DragonFly | textproc/jshon | 20180209_1 |
Install
Binary package:
pkg install jshon
From the ports tree:
cd /usr/ports/textproc/jshon/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= jshon>0:textproc/jshon
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 20180209_1 | 20180209_1 | 20180209 | 20180209_1 | 20180209_1 |
| FreeBSD:14:quarterly | 20180209_1 | 20180209_1 | n/a | 20180209_1 | 20180209_1 |
| FreeBSD:15:latest | 20180209_1 | 20180209_1 | n/a | 20180209_1 | 20180209_1 |
| FreeBSD:15:quarterly | 20180209_1 | 20180209_1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 20180209_1 | 20180209_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Library 1
libjansson.so: devel/jansson
The full lists below include those, and their dependencies in turn.
Build dependencies 4
Run dependencies 1
No port depends on this one.
Configuration
Options name: textproc_jshon
| Option | Default | Description |
|---|---|---|
| ZSH | on | Install programmable completions for zsh |
- USES
- gmake localbase:ldflags
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| keenerd-jshon-20180209-d919aea_GH0.tar.gz | 14126 | a14521b9a0bf06e48949d6bd233403b754a8ac47b08f37244e589c34d8a4db0f |
Commit history 0
No commits in the history this site was built from.