Expand description
JSON processing for ejson files.
This module provides functions to:
- Extract the public key from an ejson document
- Walk the JSON tree and selectively encrypt/decrypt string values
The walker uses a scanner-based approach instead of parsing and re-serializing to preserve key ordering and make diffs meaningful over time.
Structs§
- Json
Handler - JSON format handler implementing the FormatHandler trait.
- Walker
- Walker walks a JSON structure, applying an action to encryptable string values.
Enums§
- Json
Error - Errors that can occur during JSON processing.
Functions§
- collapse_
multiline_ string_ literals - Collapse multiline string literals by replacing embedded newlines with \n.
- extract_
public_ key - Extract the _public_key value from an EJSON document.
- trim_
underscore_ prefix_ from_ keys - Trim the first leading underscore from all keys in a JSON document.
The
_public_keyfield is excluded from trimming.