3 ms·
I wrote what I think may be the simplest possible serialization format, though I don't expect it to be a standard anytime soon https://github.com/civboot/zoa h
by vitiral 3y ago
I wrote what I think may be the simplest possible serialization format, though I don't expect it to be a standard anytime soon
https://github.com/civboot/zoa https://github.com/civboot/zoa
- theamk 3y agothat is one of the more complex serialization formats I have seen.. custom backslash-escapes, 13 operators, "variable compiler", string concatenation, user-defined types (somehow only in binary protocol), two types of maps, special "file path" type... I could say many things about it, but "simplest possible" is not one of them.
- vitiral 3y agoI misspoke, I should have said protocol. I'm referring to the bytecode not the text format. I'm probably throwing away the text format, for the reasons you outlined
- vitiral 3y agoAs I said, I mispoke. Here's how I think a JSON equivalent format should be structured: https://github.com/civboot/zoa/blob/main/notes/dynamic.md https://github.com/civboot/zoa/blob/main/notes/dynamic.md "Simple" in that it's trivial to decode with a bytestream and a jump table, and it can be written down very briefly.
- vitiral 3y agoYou inspired me to re-examine it. I wrote up the new design here: https://github.com/civboot/civlua/blob/main/zoa/README.md https://github.com/civboot/civlua/blob/main/zoa/README.md It's still in it's initial stages, but I'd love feedback :D