The
marc-in-json format is, as you might expect, a JSON serialization for MARC. A JSON serialization for MARC is potentially useful in the same places where MARC-XML would be useful (long records, utility of human-readable records, etc.) without what many perceive to be the relative pain of working with XML vs JSON.
There wasn't one for perl, so I wrote one :-)
MARC::File::MiJ is a perl module that allows MARC::Record to encode/decode marc-in-json. It also supplies a handler to MARC::File/MARC::Batch that will read marc-in-json records from a newline-delimited-json (ndj) file (where each line is a JSON object without unescaped newlines, ending with a newline).
marc-in-json encoding/decoding tends to be
pretty fast, since json parsers tend to be pretty fast, and uncompressed filesizes occupy a middle-ground between binary marc and marc-xml. A sample file of about 18k marc records looks like this:
31M topics.mrc
56M topics.ndj (newline-delimited JSON)
93M topics.xml
8.9M topics.mrc.gz
7.9M topics.ndj.gz
8.7M topics.xml.gz
...so obviously it compresses pretty well, too.