mirror of
https://github.com/matrix-construct/construct
synced 2025-01-16 09:36:54 +01:00
ircd::json: Add more escapes to map.
This commit is contained in:
parent
7984f4bdee
commit
181ed12bd7
1 changed files with 18 additions and 8 deletions
26
ircd/json.cc
26
ircd/json.cc
|
@ -261,14 +261,24 @@ struct ircd::json::output
|
|||
// string
|
||||
const std::map<char, const char *> escapes
|
||||
{
|
||||
{ '"', "\\\"" },
|
||||
{ '\\', "\\\\" },
|
||||
{ '\b', "\\b" },
|
||||
{ '\f', "\\f" },
|
||||
{ '\n', "\\n" },
|
||||
{ '\r', "\\r" },
|
||||
{ '\t', "\\t" },
|
||||
{ '\0', "\\0" },
|
||||
{ '\x00', "\\0" },
|
||||
{ '\x01', "\\u0001" }, { '\x02', "\\u0002" }, { '\x03', "\\u0003" },
|
||||
{ '\x04', "\\u0004" }, { '\x05', "\\u0005" }, { '\x06', "\\u0006" },
|
||||
{ '\a', "\\u0007" },
|
||||
{ '\b', "\\b" },
|
||||
{ '\t', "\\t" },
|
||||
{ '\n', "\\n" },
|
||||
{ '\v', "\\u000B" },
|
||||
{ '\f', "\\f" },
|
||||
{ '\r', "\\r" },
|
||||
{ '\x0E', "\\u000E" }, { '\x0F', "\\u000F" }, { '\x10', "\\u0010" },
|
||||
{ '\x11', "\\u0011" }, { '\x12', "\\u0012" }, { '\x13', "\\u0013" },
|
||||
{ '\x14', "\\u0014" }, { '\x15', "\\u0015" }, { '\x16', "\\u0016" },
|
||||
{ '\x17', "\\u0017" }, { '\x18', "\\u0018" }, { '\x19', "\\u0019" },
|
||||
{ '\x1A', "\\u001A" }, { '\x1B', "\\u001B" }, { '\x1C', "\\u001C" },
|
||||
{ '\x1D', "\\u001D" }, { '\x1E', "\\u001E" }, { '\x1F', "\\u001F" },
|
||||
{ '"', "\\\"" },
|
||||
{ '\\', "\\\\" },
|
||||
};
|
||||
|
||||
const karma::symbols<char, const char *> escaped
|
||||
|
|
Loading…
Reference in a new issue