Caleb James DeLisle on Nostr: I've had decent luck with CBOR and msgpack in the past, but generally if I'm trying ...
I've had decent luck with CBOR and msgpack in the past, but generally if I'm trying not to think too much, I'll just serialize with JSON and then lzma the file afterword if it gets too big.
Cjdns is a particular case because the original parser is in C (from 2011 or so) and bencode is one of those things you can do a pretty-much-stateless parser with 500 lines and it won't keep you up at night.
Published at
2025-03-16 23:31:48Event JSON
{
"id": "ae93fdefa54b54da51975f78fba9dc62946b0d85cd320b56ec3b774b81a9a8e8",
"pubkey": "dde9dd6efbaf3c747c06bfd60f732666acd686e4c2eff471937f0c7c5fca5e0e",
"created_at": 1742167908,
"kind": 1,
"tags": [
[
"p",
"319d9c0f16de163d1de61a89b0bfb47c014db5b63bd41e78fe058e6e1ba62c59",
"wss://relay.mostr.pub"
],
[
"e",
"bcd66359fd5a544674fd205ea138b9142b3522d9c6c12d88fe19e8f905e4d1f6",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://pkteerium.xyz/objects/303e8d2c-9c3c-44e7-830b-221f6f2f06b5",
"activitypub"
]
],
"content": "I've had decent luck with CBOR and msgpack in the past, but generally if I'm trying not to think too much, I'll just serialize with JSON and then lzma the file afterword if it gets too big.\n\nCjdns is a particular case because the original parser is in C (from 2011 or so) and bencode is one of those things you can do a pretty-much-stateless parser with 500 lines and it won't keep you up at night.",
"sig": "6fe33202ea6bfa045f87a17290fd27d0fd60edf28ff55add51e42fb4b51e96f21cbb65a8d5d944672a501c13de648c65e31ddda31c86e282da94b17a2fc3f7ac"
}