mirror of
https://github.com/nlohmann/json.git
synced 2026-03-15 05:31:24 +00:00
support construction from other basic_json types
Before this patch, `basic_json` types with different template arguments were treated as `CompatibleArrayType`. Which sometimes leads to recursive calls and stack overflows. This patch adds a constructor and a `get` overload to deal with different `basic_json` types.
This commit is contained in:
@@ -316,8 +316,8 @@ TEST_CASE("object inspection")
|
||||
SECTION("round trips")
|
||||
{
|
||||
for (const auto& s :
|
||||
{"3.141592653589793", "1000000000000000010E5"
|
||||
})
|
||||
{"3.141592653589793", "1000000000000000010E5"
|
||||
})
|
||||
{
|
||||
json j1 = json::parse(s);
|
||||
std::string s1 = j1.dump();
|
||||
|
||||
Reference in New Issue
Block a user