Behold, a way to deterministically hash JSON without canonicalization https://gist.github.com/DavidBuchanan314/e2d84c50cbd8e7c86eaa25f0c5b29a5c

This is probably broken, I look forward to someone who is good at maths telling me that I'm doing it wrong.

@retr0id One problem I can think of: how would this handle the difference in decimal/float number handling that can exist between languages?

@retr0id (This presumes that inter-language determinism is desirable; which seems like a reasonable assumption, given that if it's not, your language of choice likely has a language-specific deterministic hashing mechanism anyway, and you don't need to deal with JSON anything)

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.