You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JCS can be used to establish a canonical deterministic representation
of linked JSON data. These represenations can then be used in
establishing identity proofs.
That report also gives as an example usage identity proofs, the ability to
authenticate as an entity identified by a Decentralized Identifier (DID).
The JSON encoding here is probably orders of magnitude slower than the Jason
library. There is no attempt here to decent better memory management in
building the output, and sorting object properties based on their
UTF-16-encoded keys can probably be greatly improved also.
Also note that while the RFC states that the Ryu algorithm is compliant for
encoding floats, the Erlang implementation encodes integral values like 1e+23
as "1.0e23", where as RFC 8785 would encode this as "1e+23".
When attempting to handle all the test cases in the RFC appendix, it appears
as though not all of the IEEE754 double value examples are able to be encoded
into Elixir floats. These are commented out as "Elixir can not set this value"
in the JcsNumbersTest test module.
About
A pure Elixir implementation of RFC 8785: JSON Canonicalization Scheme (JCS)