bookclerk_plugin_abi::json_bytes
Serde helpers projecting Cap'n Proto Data fields as base64 text in JSON.
The typed ABI travels as Cap'n Proto; JSON projections exist only for transport-private bridges (the workerd HTTP bridge), operator diagnostics, and tests. Bytes serialize as standard base64 (padded) and deserialize from either base64 text or a JSON number array, so hand-written fixtures stay readable.
| Item | Kind | Summary |
|---|---|---|
encode |
function | Encodes bytes as standard base64 text (bridge JSON projection). |
decode_text |
function | Decodes standard base64 text. |
pub fn encode(bytes: &[u8]) -> String
Encodes bytes as standard base64 text (bridge JSON projection).
pub fn decode_text(text: &str) -> Result<Vec<u8>, String>
Decodes standard base64 text.
Returns when the text is not valid base64.
Generated from crates/bookclerk-plugin-abi at main · View as Markdown