-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Error thrown when parsing in a subclass #2124
Copy link
Copy link
Closed
Labels
kind: bugstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
Description
Metadata
Metadata
Assignees
Labels
kind: bugstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
When I create an instance of a subclass of
nlohmann::json, attempting to deserialize a string to it usingjson::parsethrows an error.Given:
then the following all work as expected:
but any of the following throw an error:
The error thrown is
[json.exception.type_error.302] type must be array, but is object.Deserializing a string to a
nlohmann::jsonsubclass should work.An error is thrown:
[json.exception.type_error.302] type must be array, but is object.Mac OS X 10.14.6
Xcode 11.3.1 (11C505)
Apple clang version 11.0.0 (clang-1100.0.33.17)
developbranch?Release 3.7.3.
This may be related to issue #608, although I'm unable to reproduce the exact problem described there.