When the caf::json_writer serializes a string to json that contains bytes between 0x00 and 0x1f, the resulting json can't be deserialized correctly by e.g. nlohmann::json. The reason for this is that the print_escaped_to function in print.hpp does not have a special case for these control characters, which should be escaped to \uxxxx. An equivalent from nlohmann would be this piece of code: https://github.com/nlohmann/json/blob/ec7a1d834773f9fee90d8ae908a0c9933c5646fc/src/json.hpp#L4678-L4685
When the
caf::json_writerserializes a string to json that contains bytes between 0x00 and 0x1f, the resulting json can't be deserialized correctly by e.g. nlohmann::json. The reason for this is that theprint_escaped_tofunction inprint.hppdoes not have a special case for these control characters, which should be escaped to\uxxxx. An equivalent from nlohmann would be this piece of code: https://github.com/nlohmann/json/blob/ec7a1d834773f9fee90d8ae908a0c9933c5646fc/src/json.hpp#L4678-L4685