JSON was a dumb idea...
#[0]
JSON was a dumb idea...
#[0]
How about MessagePack? Faster to encode and decode than TLV, good for dynamic data structures apparently.
“TLV, JSON, and MessagePack are serialization formats without predefined schemas, enabling flexibility to represent a variety of data structures.
The protocol employing the format(s) establishes the rules necessary for correctly interpreting the encoded data.”
Never looked at MessagePack.
Last time I had to design a consensus critical message format I came to the unenviable conclusion that none of the existing ones were right. But that was for something different than nostr.
What’s the logic behind that conclusion? Would be nice to avoid reinventing the wheel.
I’m curious about what problems you encountered.
I do like the simplicity of TLV and how it doesn't inherently define specific data types. Lightning using it seems promising.
Minor benefits of MessagePack probably aren’t worth its complexity.