Skip to content

substrate-system/json-canon

 
 

Repository files navigation

json-canon

tests types module semantic versioning Common Changelog install size gzip size dependencies license

Serialize JSON into a canonical format — safe for generating a consistent cryptographic hash or signature.

Follows RFC8785: JSON Canonicalization Scheme (JCS)

Contents

JSON cannon

Fork

This is a fork of ahdinosaur/json-canon.

Featuring

The JSON Canonicalization Scheme concept in a nutshell:

  • Serialization of primitive JSON data types using methods compatible with ECMAScript's JSON.stringify()
  • Lexicographic sorting of JSON Object properties in a recursive process
  • JSON Array data is also subject to canonicalization, but element order remains untouched

References

About

Serialize JSON into a canonical format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%