News for hackers. Stuff that matters.
Re:Jq: A lightweight and flexible command-line JSON processor by jeroenjanssens on Sunday June 15, 2014 @11:37AM (#7895447)
I'd just use xml2json and then apply jq. Usually gets the job done. The benefit of that is that you only need to learn jq.

See this blog post I wrote a while ago for an example: http://jeroenjanssens.com/2013/09/19/seven-command-line-tool...

Re:Jq: A lightweight and flexible command-line JSON processor by cryptonector on Monday June 16, 2014 @02:49AM (#7897721)
Most of the JSON conversions from XML get it all wrong though. XML is not really an object (dict, hash) based meta-schema. It's an array-based meta-schema. XML->JSON conversions should look something like this:

    [ {"tag":"something", "attributes": { ... }, "nodes": [ ...] }, ... ]
with nodes being objects with one key to indicate if the node is a text node or an element, and if a text node then a value, and so on.