Add support for escape sequence \'

Fixes #2124
This commit is contained in:
Benoit Blanchon
2024-09-17 10:33:47 +02:00
parent c1a507c158
commit f806a42cc2
4 changed files with 23 additions and 2 deletions
@@ -46,6 +46,10 @@ TEST_CASE("serializeJson(JsonVariant)") {
check("fifty/fifty"_s, "\"fifty/fifty\"");
}
SECTION("Don't escape single quote") {
check("hello'world"_s, "\"hello'world\"");
}
SECTION("Escape backspace") {
check("hello\bworld"_s, "\"hello\\bworld\"");
}