Appending julia objects to a file (JLD)

I quite like the JSONL format (have a file just be one JSON blob after the other). It’s useful for appending results, logging etc. What would be the equivalent in the julia ecosystem? I want to

open("somefile", "a+") do f
    write(f, my_complicated_julia_object)

and then I want to read the objects back.

I can use serialize, but that’s not compatible across versions. Both JLD and JLD2 feel like they should provide this, but they’re based on HDF5 for reasons I don’t understand, so you have to give names to everything. I guess I could just increase a counter and name my stuff “object1”, “object2” etc. but that’s kinda lame.

1 Like