timathom / marc-schema

JSON description of the MARC Authority, Bibliographic, and Holdings schemata
Apache License 2.0
6 stars 1 forks source link

Normalize JSON serializations #11

Closed nichtich closed 8 months ago

nichtich commented 11 months ago

JSON serialization is not stable because order of keys in JSON objects can change. To better support tracking actual changes in the schema, I'd normalize the JSON. This is possible for with the command line tool jq. (jq -S input.json > normalized.json). jq could also do some other post-processing to solve #1. Any objections to introduce jq as additional dependency?

timathom commented 9 months ago

@nichtich Apologies, I haven't had much time to devote to this project in recent months. I just created a new PR to add a call to jq from BaseX before writing the files to disk.

Also invited you to this repo so that you can review/approve PRs, etc.