diff options
| author | tv <tv@krebsco.de> | 2026-11-16 17:48:39 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 19:06:58 +0100 |
| commit | 602fee6edc1e8ecd35655d9a3b12c861de0428d4 (patch) | |
| tree | 8fec158a4f7959744425f933e4e60d23dd819a8e /src/federation/mod.rs | |
| parent | eeda8fb6ced3ac9887f43196d3396beadbe78819 (diff) | |
federation: JSON written one way
An event is the JCS encoding (RFC 8785) of a JSON object, within the limits federation 1
sets (`docs/federation.md`, Events). `jcs::read` gives the JSON bytes are only where
they are what JCS writes of it: names sorted by their UTF-16 units and none twice, no
whitespace, strings escaped as ECMAScript escapes them; and, beyond JCS, numbers only
integers from −2⁵³ to 2⁵³, strings only whole Unicode characters, and objects and
arrays nested up to 32 deep. Tests show what reads back and what is none, the order of
names by UTF-16 units that byte order gets wrong, and the depth.
Diffstat (limited to 'src/federation/mod.rs')
| -rw-r--r-- | src/federation/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/federation/mod.rs b/src/federation/mod.rs index 0005038..6485c8a 100644 --- a/src/federation/mod.rs +++ b/src/federation/mod.rs @@ -5,4 +5,5 @@ // Until a node runs it (stage 3), parts of it are used by nothing, or by tests alone. #![allow(dead_code)] +pub(crate) mod jcs; pub(crate) mod store; |
