morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::journal::detail::EscapingWriteOpts Struct Reference

Write options that escape ASCII control bytes as \\uXXXX sequences. More...

#include <action_log_json.hpp>

Public Attributes

bool escape_control_characters = true
 Emit control bytes as \\uXXXX rather than raw.

Detailed Description

Write options that escape ASCII control bytes as \\uXXXX sequences.

glaze 7.4 leaves control bytes (0x00-0x1F) unescaped by default, which breaks a LogEntry carrying one in entityKey/payload/error/principal/ idempotencyKey two ways: RFC 8259 requires those bytes escaped, so the raw byte alone yields JSON fromJson's glz::read throws on; worse, once the same string also contains an escaped \\endiskip or ", glaze's chunked writer path silently rewrites the control byte as two 0x00 bytes, corrupting the payload before it ever reaches disk. This mirrors morph::wire::detail::EscapingWriteOpts (core/wire.hpp) exactly; duplicated here (rather than shared) so this header stays free of a core/ dependency for MORPH_CLIENT_ONLY-style consumers that only want the journal. Escaping is lossless, so any such byte still round-trips through fromJson unchanged.

Definition at line 72 of file action_log_json.hpp.

Member Data Documentation

◆ escape_control_characters

bool morph::journal::detail::EscapingWriteOpts::escape_control_characters = true

Emit control bytes as \\uXXXX rather than raw.

Definition at line 75 of file action_log_json.hpp.


The documentation for this struct was generated from the following file: