mirror of
https://github.com/nlohmann/json.git
synced 2026-02-24 20:36:27 +00:00
+ more test cases
This commit is contained in:
11
src/JSON.cc
11
src/JSON.cc
@@ -477,11 +477,6 @@ const std::string JSON::toString() const noexcept
|
||||
{
|
||||
switch (_type)
|
||||
{
|
||||
case (value_type::null):
|
||||
{
|
||||
return "null";
|
||||
}
|
||||
|
||||
case (value_type::string):
|
||||
{
|
||||
return std::string("\"") + *_value.string + "\"";
|
||||
@@ -533,6 +528,12 @@ const std::string JSON::toString() const noexcept
|
||||
|
||||
return "{" + result + "}";
|
||||
}
|
||||
|
||||
// actually only value_type::null - but making the compiler happy
|
||||
default:
|
||||
{
|
||||
return "null";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user