home ¦ Archives ¦ Atom ¦ RSS

convert2json

Link parkin’: convert2json, GitHub repo

Utilities for use on the command line to convert BSON, CBOR, CSV, INI, MessagePack, Plist, RSV, TOML, XML, & YAML to JSON. For each supported format, there is a tool for use in a pipe as well as a wrapper that passes the converted input or files in the arguments to jaq or jq for further querying and processing.

This is one of the few tools I’ve seen that’s both fast and reasonably error-resistant for converting XML to JSON.

I have a work in progress repository for turning Discogs Data Dumps, which are big to ginormous, into a DB ingest-friendly format. The dumps are in XML. The goal is XML —> JSONL —> Parquet —> DBs. discogs-xml2db is written in Python, and to date, I have only been able to get it so robust (old datasets are sketchy with mojibake and ill-formed XML) and performant (newer datasets are gigabytes of compressed XML). I’m going to give a coding agent a chance, but I’m not all that hopeful.

In the event that route doesn’t pan out, I’ll fall back to wrapping convert2json, crate, or binary CLI within a Python module. It could be an interesting experiment just by itself.

© 2008-2025 C. Ross Jam. Built using Pelican. Theme based upon Giulio Fidente’s original svbhack, and slightly modified by crossjam.