Closed
Description
-
What is the issue you have?
The type of json object is set as 'array' in a constructor of an inherited class. -
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
class child : public nlohmann::json {
public:
explicit child(const nlohmann::json &j) : nlohmann::json{j} {}
};
nlohmann::json j = nlohmann::json::parse("{\"a\":1}");
child c{j};
-
What is the expected behavior?
The type ofc
should be 'object', not 'array'. -
And what is the actual behavior instead?
The type ofc
is 'array'. -
Which compiler and operating system are you using? Is it a supported compiler?
Visual Studio 2019 (v142) -
Did you use a released version of the library or the version from the
develop
branch?
A released version 3.7.0 -
If you experience a compilation error: can you compile and run the unit tests?
This is not a compilation error.
Metadata
Assignees
Labels
No labels