<story><title>Jo - JSON output from a shell</title><url>https://github.com/jpmens/jo</url></story><parent_chain></parent_chain><comment><author>networked</author><text>Neat. An ad hoc alternative to this if you have Python 2.7 handy and can&amp;#x27;t or don&amp;#x27;t want to compile C code could be something like&lt;p&gt;&lt;pre&gt;&lt;code&gt;  $ python -c &amp;#x27;import json, sys;\
  kv = sys.argv[1::];\
  v = [int(x) if x.isdigit() else eval(x.title()) if x in [&amp;quot;false&amp;quot;, &amp;quot;true&amp;quot;]\
      else x for x in kv[1::2]];\
  print json.dumps(dict(zip(kv[::2], v)), ensure_ascii=False, indent=2)
 &amp;#x27; key1 value1 key2 &amp;#x27;string value 2&amp;#x27; number 5589 boolean1 true boolean2 false
&lt;/code&gt;&lt;/pre&gt;
which produces the output&lt;p&gt;&lt;pre&gt;&lt;code&gt;  {
    &amp;quot;key2&amp;quot;: &amp;quot;string value 2&amp;quot;, 
    &amp;quot;key1&amp;quot;: &amp;quot;value1&amp;quot;, 
    &amp;quot;number&amp;quot;: 5589, 
    &amp;quot;boolean2&amp;quot;: false, 
    &amp;quot;boolean1&amp;quot;: true
  }
&lt;/code&gt;&lt;/pre&gt;
I, for one, am excited to hear that native JSON (and XML, and HTML) output is coming to FreeBSD&amp;#x27;s userland courtesy of libxo (see &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;wiki.freebsd.org&amp;#x2F;LibXo&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;wiki.freebsd.org&amp;#x2F;LibXo&lt;/a&gt;). I hope GNU Core Utilities eventually go the same way or a full-featured alternative appears for Linux that does.</text></comment>
<story><title>Jo - JSON output from a shell</title><url>https://github.com/jpmens/jo</url></story><parent_chain></parent_chain><comment><author>techdragon</author><text>Awesome complimentary program to the `jq` tool.&lt;p&gt;However... I do wish the name was `json` not `jo`. In my case  more for personal reasons regarding painful memories attached to the name &amp;#x27;Jo&amp;#x27;, but I also think the tool creates JSON, so why not call it `json` or `jp` short for &amp;#x27;json print&amp;#x27; ... but the matter appears settled. Oh well.</text></comment>