planetis-m / jsonpak

Packed ASTs for compact and efficient JSON representation, with JSON Pointer, JSON Patch support.
https://planetis-m.github.io/jsonpak/
MIT License
24 stars 1 forks source link

Document jsontree/sorted and add hash function #35

Closed planetis-m closed 5 months ago

planetis-m commented 5 months ago

And maybe a $ operator that follows rfc8785 Also see: https://github.com/jackhftang/canonicaljson.nim

planetis-m commented 5 months ago

Sorting keys as utf16 is an absolute non. Formatting numbers works correctly if we set forceTrailingDotZero=false, for the schubfach and dragonbox algorithms provided by the stdlib. Need to make a proc canonify that returns string.

planetis-m commented 5 months ago

As good as it can be without overcomplicating things to follow stupid standards.