Skip to content

Support JSON Canonical Scheme (JCS) - RFC 8785 #167

Open
@pzingg

Description

@pzingg

In order to implement Data Integrity Proofs for linked data, Elixir should have a fast JSON encoder that compiles with RFC 8785.

I think there are only few tricky points:

1 [ ]. Encoded string keys and values must be escaped by the RFC's section 3.2.2.2.. This may already be happening in Jason.
2 [x]. Floats must be encoded per the Ryu algorithm according to the RFC's section 3.2.2.3.. I think Jason now handles this for OTP > 25 with the [:short] option for in :erlang.float_to_binary/2.
3 [ ]. Encoded objects (recursively and when found in arrays) must have their properties sorted in UTF-16 integer order per the RFC's section 3.2.3

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions