Flatbuffers is pretty great, one side benefit of these types of technologies is you can also use them to structure your memory accesses.
I've done this in Java to do cache aware reading to pretty great success.
I've done this in Java to do cache aware reading to pretty great success.