If you want something simpler than I highly recommend msgpack. It's pretty similar to json conceptually. Just binary, so it's way faster to read/write and way smaller
Can it work with non plain old data? Since the reason I couldn't save into a binary file was because my data used sets and pairs.