Expand description
JSON serialization helpers for the string-pool export/import feature.
These functions are used by the CLI (main.rs) for the --stringblocks-file
option. Keeping them here (instead of in main.rs) makes them unit-testable.
Functions§
- export_
stringblocks - Serialize a string pool as a JSON object
{ "0": "…", "1": "…", … }. - import_
stringblocks - Populate a string pool from a JSON object previously produced by
export_stringblocks. - json_
escape - Escape a string for safe embedding inside a JSON double-quoted value.
- json_
unescape - Unescape a JSON double-quoted string value (inverse of
json_escape).