Use oq instead of xmltodict #90

Open
opened 2021-11-07 15:53:54 +00:00 by lucidiot · 2 comments
Owner

oq is a wrapper around jq similar to yq. It adds supports for YAML and XML inputs and outputs and seems to provide all the features ITSB needs to replace xmltodict and possibly make the parsing steps faster. Some benchmarking could be interesting.

https://blacksmoke16.github.io/oq/index.html

As a side note, this made me discover that xmltodict and oq both parse JSON using this random article: https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html

`oq` is a wrapper around `jq` similar to `yq`. It adds supports for YAML and XML inputs and outputs and seems to provide all the features ITSB needs to replace `xmltodict` and possibly make the parsing steps faster. Some benchmarking could be interesting. https://blacksmoke16.github.io/oq/index.html As a side note, this made me discover that xmltodict and oq both parse JSON using this random article: https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
lucidiot added the
enhancement
label 2021-11-07 15:53:54 +00:00
Author
Owner
Waiting on https://github.com/Blacksmoke16/oq/issues/103
Author
Owner

Another tool to experiment with: Xidel, which provides XQuery/JSONiq instead of jq scripts. This sounds simpler and more powerful than jq, since Xidel can run processes and make HTTP requests, and includes date parsing, URL parsing, and more wheels that I usually get to reinvent in jq. This could replace pup, jq, xmltodict, curl, and resolve #73.

I found this while looking at XProc, which probably could be yet another version of ITSB's generator, except that it seems every implementation requires Java or some proprietary software.

Another tool to experiment with: [Xidel](https://www.videlibri.de/xidel.html), which provides XQuery/JSONiq instead of jq scripts. This sounds simpler and more powerful than jq, since Xidel can [run processes](https://www.benibela.de/documentation/internettools/xpath-functions.html#x-system) and [make HTTP requests](https://www.benibela.de/documentation/internettools/xpath-functions.html#x-request), and includes date parsing, URL parsing, and more wheels that I usually get to reinvent in jq. This could replace `pup`, `jq`, `xmltodict`, `curl`, and resolve #73. I found this while looking at [XProc](https://xproc.org/), which probably could be yet another version of ITSB's generator, except that it seems every implementation requires Java or some proprietary software.
Sign in to join this conversation.
No description provided.