Skip to main content

JSON Hash

Latest version LGPL 3.0 Deno Doc (API references) GitHub Actions

This package contains the following JSON utilties for Deno:

  • digest.ts provides cryptographic hash digests of JSON trees. It guarantee that digest() function always returns the same digest for the equivalent JSON trees. It means you don’t have to care about the order of how object keys occurs or how characters in string are encoded. It also provides various hash algorithms; see also the docs of Deno’s std/crupto module.

  • merkle.ts provides hash digests of JSON Merkle trees. It can be used for efficient diff of two large trees or updating a deep leaf in a large tree.

  • canon.ts provides canonicalization of JSON trees. This complies with RFC 8785, also known as JCS (JSON Canonicalization Scheme).

  • mod.ts re-exports everything in the above files.

See also Deno Doc for the complete API references.

License

Distributed under LGPL 3.0.