Man, if I had a dollar for every time data roundtripping to files has corrupted things I&#x27;d have many dollars.<p>The schema-based serialization libraries (Thrift, Protobufs) or MsgPack are a good way to avoid that too. They come with a lot less baggage than say HDF5. Also, if efficiency isn&#x27;t paramount -- just use SQLite! Amazing tool when it&#x27;s in its sweetspot.<p>Lots of tradeoffs when dealing w&#x2F; serialization and file formats, no easy answers.