1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
# jo

This is `jo`, a small utility to create JSON objects
```bash
$ jo -p name=jo n=17 parser=false
{
"name": "jo",
"n": 17,
"parser": false
}
```
or arrays
```bash
$ seq 1 10 | jo -a
[1,2,3,4,5,6,7,8,9,10]
```
It has a [manual](jo.md), and you can read [why I wrote jo](http://jpmens.net/2016/03/05/a-shell-command-to-create-json-jo/).
## Build from Release tarball
To build from [a release](https://github.com/jpmens/jo/releases) you will need a C compiler to install from a source tarball which you download from the [Releases page](https://github.com/jpmens/jo/releases).
```bash
tar xvzf jo-1.3.tar.gz
cd jo-1.3
autoreconf -i
./configure
make check
make install
```
## Build from Github
[](https://travis-ci.com/github/jpmens/jo)
To install from the repository, you will need a C compiler as well as a relatively recent version of _automake_ and _autoconf_.
```bash
git clone https://github.com/jpmens/jo.git
cd jo
autoreconf -i
./configure
make check
make install
```
## Install
### Homebrew
```bash
brew install jo
```
### MacPorts
```bash
sudo port install jo
```
### Ubuntu
```
apt-get install jo
```
### Gentoo
```
emerge jo
```
### Fedora
```
dnf install jo
```
### Snap
Thanks to [Roger Light](https://twitter.com/ralight/status/1166023769623867398), _jo_ is available as a [snap package](https://snapcraft.io/jo). Use `snap install jo` from a Linux distro that supports snaps.
### Windows
```cmd
scoop install jo
```
### Windows WSL2
As shown in [#175](https://github.com/jpmens/jo/issues/175) when using _git_ on Windows WSL2 it should be necessary to disable automatic CRLF conversion in _git_ or the tests will fail:
```cmd
git config --local core.autocrlf false
```
### AIX
_jo_ builds and passes all tests on AIX 7.1 using the _autoconf_, _automake_, _gcc_, and _pkg-config_ RPMs from IBM's [AIX Toolbox for Open Source Software](https://www.ibm.com/support/pages/node/883796). The _xlclang_ compiler from IBM's xlC/C++ suite for AIX will also build _jo_.
## Others
* [voidlinux](https://github.com/voidlinux/void-packages/tree/master/srcpkgs/jo)
* [ArchLinux](https://archlinux.org/packages/community/x86_64/jo/)
* [OpenBSD](http://openports.se/textproc/jo)
* [FreeBSD](https://www.freshports.org/textproc/jo)
* [Guix](https://guix.gnu.org/packages/jo-1.4/)
* [pkgsrc](http://pkgsrc.se/textproc/jo)
* [repology.org](https://repology.org/metapackage/jo/versions)
* [Docker](https://hub.docker.com/repository/docker/jpmens/jo)
## See also
* [gjo](https://github.com/skanehira/gjo)
* [rjo](https://github.com/dskkato/rjo)
* [jjo](https://github.com/memoryhole/jjo)
## Credits
* `json.[ch]` by 2011 Joseph A. Adams (joeyadams3.14159[at]gmail.com).
|