Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1797: rework JSON conversions for transaction metadata r=dcoutts a=KtorZ a. Encode JSON as CBOR considering only the following "optimizations" b. Hexadecimal sequences starting with 0x are encoded as CBOR bytestring. c. JSON keys that are numbers are encoded as CBOR numbers. d. CBOR is shown as JSON when possible, or as a string representing JSON-encoded data when not (i.e. when map keys aren't numbers or strings). e. CBOR bytestrings are represented as hexadecimal strings prefixed with 0x - we expect are that we can round trip any JSON without constraints (modulo null and boolean values) - for CBOR, we should be able to round trip a subset with some simple-ish constraints. Co-authored-by: Duncan Coutts <duncan@well-typed.com>
- Loading branch information