minor change
This commit is contained in:
parent
d31d1ca664
commit
b1be1b45ee
3 changed files with 9 additions and 2 deletions
|
@ -1491,7 +1491,7 @@ class basic_json
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (c <= 0x1f)
|
if (c >= 0 and c <= 0x1f)
|
||||||
{
|
{
|
||||||
// control characters (everything between 0x00 and 0x1f)
|
// control characters (everything between 0x00 and 0x1f)
|
||||||
// -> create four-digit hex representation
|
// -> create four-digit hex representation
|
||||||
|
|
|
@ -1491,7 +1491,7 @@ class basic_json
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (c <= 0x1f)
|
if (c >= 0 and c <= 0x1f)
|
||||||
{
|
{
|
||||||
// control characters (everything between 0x00 and 0x1f)
|
// control characters (everything between 0x00 and 0x1f)
|
||||||
// -> create four-digit hex representation
|
// -> create four-digit hex representation
|
||||||
|
|
|
@ -1080,6 +1080,13 @@ TEST_CASE("object inspection")
|
||||||
auto s = json(42.23).dump();
|
auto s = json(42.23).dump();
|
||||||
CHECK(s.find("42.23") != std::string::npos);
|
CHECK(s.find("42.23") != std::string::npos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SECTION("dump and non-ASCII characters")
|
||||||
|
{
|
||||||
|
CHECK(json("ä").dump() == "\"ä\"");
|
||||||
|
CHECK(json("Ö").dump() == "\"Ö\"");
|
||||||
|
CHECK(json("❤️").dump() == "\"❤️\"");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("return the type of the object (explicit)")
|
SECTION("return the type of the object (explicit)")
|
||||||
|
|
Loading…
Reference in a new issue