vrs-python icon indicating copy to clipboard operation
vrs-python copied to clipboard

Replace ndjson with jsonl

Open korikuzma opened this issue 6 months ago • 4 comments

@ahwagner mentioned he called newline-delimited JSON ndjson, but he actually meant to say JSON Lines . They appear to be very similar formats (ndjson allows blank lines), but we should replace ndjson with jsonl.

korikuzma avatar Jun 05 '25 11:06 korikuzma

Thanks @korikuzma

ahwagner avatar Jun 05 '25 13:06 ahwagner

I believe -- though I could be wrong -- that we are already in conformance with either. We would just want to change language and that should be enough.

jsstevenson avatar Jun 25 '25 18:06 jsstevenson

We could make a --jsonl-out work as the current --ndjson-out does, with records separated by a single \n char, and make a new --ndjson-out which separates records by a random number of \n chars between 1 and 5, in order to make it clear that they are different and convince people to use jsonl over ndjson.

https://github.com/ga4gh/vrs-python/blob/9cbb4b610f4385d6cbef6872a62ca0809a1e38f7/src/ga4gh/vrs/extras/annotator/cli.py#L123

theferrit32 avatar Jul 28 '25 16:07 theferrit32

@theferrit32 only 5? dream bigger

jsstevenson avatar Jul 28 '25 16:07 jsstevenson