Skip to content

WIP: Streamable minimal json format

Ask Hjorth Larsen requested to merge streamable-minimal-json-format into master

This is one way to do a simple traj-like JSON format.

Each line contains one image. This is a bit ugly but makes things simple. I can change it to multi-line chunks if we want that, though.

The format does not 'destroy' the file by reading more than required (e.g. fd.read()), so other types of data can be written before/after in a stream.

Also, one does not need to know all the images before writing. (This was problem with streams using the old JSON format. The file is not valid before the terminator is written, and once the terminator is written, it is effectively closed)

Merge request reports