- 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 of `c` should be 'object', not 'array'. - And what is the actual behavior instead? The type of `c` is 'array'. - Which compiler and operating system are you using? Is it a [supported compiler](https://github.com/nlohmann/json#supported-compilers)? 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](https://github.com/nlohmann/json#execute-unit-tests)? This is not a compilation error.
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?
What is the expected behavior?
The type of
cshould be 'object', not 'array'.And what is the actual behavior instead?
The type of
cis '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
developbranch?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.