|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
Write options that escape ASCII control bytes as \\uXXXX sequences. More...
#include <wire.hpp>
Public Attributes | |
| bool | escape_control_characters = true |
| Emit control bytes as \\uXXXX rather than raw. | |
Write options that escape ASCII control bytes as \\uXXXX sequences.
glaze 7.4 leaves control bytes unescaped by default, which breaks encode two different ways depending on where the byte lands:
Enabling the option is glaze's documented remedy for exactly this (see its README, "escape control characters"); it is off by default there only because embedded nulls are hazardous for C APIs, which does not apply to a std::string wire field. Escaping is lossless in both directions, so any such byte round-trips unchanged rather than being replaced.
Applies to writing only. decode needs no counterpart: glaze's reader already accepts \\uXXXX and turns it back into the original byte.
| bool morph::wire::detail::EscapingWriteOpts::escape_control_characters = true |