aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/jcs.rs
Commit message (Collapse)AuthorAgeFilesLines
* federation: the JCS test asks escapes JCS doesn't write, as escapestv21 hours1-2/+4
| | | | | | Two of the strings `json_written_otherwise_is_none` takes for none, an escaped U+2028 and an escaped `A`, stood in the file as the characters themselves, which JCS writes as they are: the test took them for none, and they read. They are built as escapes now.
* federation: JSON written one waytv22 hours1-0/+451
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.