CBOR is completely useless. Schemaless is a bad idea, CBOR just improves 0.1% over JSON and because of that you lose all the JSON tooling in the world.

I guess if the Nostr event format was an array like I thought 5 hours ago then we would have basically lost that too. I think the way things are is better indeed.

Reply to this note

Please Login to reply.

Discussion

CBOR is only a bit faster indeed, but the real gains come from switching to binary with the array.

I suggested CBOR because it is the simplest binary encoder, akin to JSON. All the other binary encoders require schemes. JSON is schemaless, like CBOR.

We spent a lot time making everything backwards compatible btw, so I hope JSONs are quick enough for the future. :-)

fastest is Gob but all those rustaceans would cry.

NSON is pretty fast: https://github.com/nbd-wtf/go-nostr/tree/master/nson

But when you compare the speed gains of using anything other than JSON (even if you use the fastest possible binary encoding) with the time it takes to verify a signature then you see how pointless all these efforts are.