fed-sx-m1: Step 4b-cod — 8 bootstrap codecs/sig-suites/audience files + manifest complete + 14 new parse tests (50 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 26s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 26s
This commit is contained in:
12
next/genesis/codecs/dag-json.sx
Normal file
12
next/genesis/codecs/dag-json.sx
Normal file
@@ -0,0 +1,12 @@
|
||||
;; next/genesis/codecs/dag-json.sx
|
||||
;;
|
||||
;; JSON encoding with dag-json restrictions per IPLD: sorted map
|
||||
;; keys, no NaN / Infinity, no comments, CIDs as `{"/": "..."}`.
|
||||
;; Used as the human-readable wire format for ActivityPub interop
|
||||
;; (JSON-LD over dag-json).
|
||||
|
||||
(DefineCodec
|
||||
:name "dag-json"
|
||||
:doc "Deterministic JSON with dag-json restrictions. Sorted\n keys, CIDs as the {\"/\": \"...\"} object. Used by the\n HTTP server (Step 8) for application/json responses."
|
||||
:encode (fn (term) (host-codec :dag-json :encode term))
|
||||
:decode (fn (bytes) (host-codec :dag-json :decode bytes)))
|
||||
Reference in New Issue
Block a user