mirror of
https://github.com/nlohmann/json.git
synced 2026-10-07 23:17:14 +00:00
Quick and dirty implementation for basic multilingual plane in the unicode escape mechanism
This commit is contained in:
1 parent
13efc7a02a
commit
222aacc213
3 files changed
+81
No files matched your search
@@ -1652,6 +1652,10 @@ TEST_CASE("Parser")
|
||||
CHECK(json::parse("\"a\\nz\"") == json("a\nz"));
|
||||
CHECK(json::parse("\"\\n\"") == json("\n"));
|
||||
|
||||
// escape unicode characters
|
||||
CHECK(json::parse("\"\\u002F\"") == json("/"));
|
||||
CHECK(json::parse("\"\\u00E4\"") == json(u8"\u00E4"));
|
||||
|
||||
// escaping senseless stuff
|
||||
CHECK_THROWS_AS(json::parse("\"\\z\""), std::invalid_argument);
|
||||
CHECK_THROWS_AS(json::parse("\"\\ \""), std::invalid_argument);
|
||||
|
||||
Reference in new issue
Block a user