varx/tech on Nostr: npub18369m…z8jp6 I feel like with binary protocols, there's a marginally higher ...
npub18369m6ejyjfh47ths7qrlvqcu8jvyzxnuysx72cpvg95jfvt9l0s5z8jp6 (npub1836…8jp6) I feel like with binary protocols, there's a marginally higher chance that protocol implementers will follow the spec carefully—a bit of an incidental gatekeeping effect.
There's a JSON canonicalization spec, but what you really need is a spec for *parsing* JSON safely. One approach would be to parse it, then recanonicalize it according to https://www.rfc-editor.org/rfc/rfc8785 and finally check if it is byte-for-byte identical with the input. But that spec doesn't actually say to do so, as far as I can tell!
There's a JSON canonicalization spec, but what you really need is a spec for *parsing* JSON safely. One approach would be to parse it, then recanonicalize it according to https://www.rfc-editor.org/rfc/rfc8785 and finally check if it is byte-for-byte identical with the input. But that spec doesn't actually say to do so, as far as I can tell!