mirror of
https://github.com/nlohmann/json.git
synced 2025-07-12 09:21:42 +03:00
⚡ avoid string in case of empty objects
This commit is contained in:
@ -1082,6 +1082,8 @@ class binary_reader
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (len != 0)
|
||||||
|
{
|
||||||
string_t key;
|
string_t key;
|
||||||
if (len != std::size_t(-1))
|
if (len != std::size_t(-1))
|
||||||
{
|
{
|
||||||
@ -1116,6 +1118,7 @@ class binary_reader
|
|||||||
key.clear();
|
key.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return sax->end_object();
|
return sax->end_object();
|
||||||
}
|
}
|
||||||
|
@ -9298,6 +9298,8 @@ class binary_reader
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (len != 0)
|
||||||
|
{
|
||||||
string_t key;
|
string_t key;
|
||||||
if (len != std::size_t(-1))
|
if (len != std::size_t(-1))
|
||||||
{
|
{
|
||||||
@ -9332,6 +9334,7 @@ class binary_reader
|
|||||||
key.clear();
|
key.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return sax->end_object();
|
return sax->end_object();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user