Skip to main content

Module json

Module json 

Source
Expand description

JSON conventions shared by every module (specification §2, §3.6, §7).

Modules§

u64_decimal
#[serde(with = "crate::json::u64_decimal")]: a u64 as a JSON decimal string, because JavaScript numbers lose bits above 2^53 (permission sets, ADR-0006).

Structs§

SignedJson
A signed object as it travels in JSON (specification §3.6): the canonical bytes B and the composite signature, both base64url. Receivers verify sig over bytes with the context of the object type they expect before decoding bytes.

Enums§

Patch
A field that distinguishes “absent” from “null” in update commands (channel.update with "topic": null clears the topic; no topic leaves it).

Functions§

is_zero_u32
skip_serializing_if for a u32 that is absent when 0 (message flags, §8.14).