You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error could not find from_json() method in T's namespace.
Which compiler and operating system are you using? Is it a supported compiler?
Xcode Version 10.0 beta (10L176w).
Did you use a released version of the library or the version from the develop branch?
develop.
Adding the following code to the library solves the issue:
template<typename BasicJsonType>
voidfrom_json(const BasicJsonType& j, typename std::nullptr_t& n)
{
if (JSON_UNLIKELY(not j.is_null()))
{
JSON_THROW(type_error::create(302, "type must be null, but is " + std::string(j.type_name())));
}
n = nullptr;
}
The text was updated successfully, but these errors were encountered:
We use the
nullptr
to denote JSON'snull
value.json j = nullptr;
But the reverse does not work:
std::nullptr_t n = j;
Output:
Error
could not find from_json() method in T's namespace
.Xcode Version 10.0 beta (10L176w).
develop
branch?develop
.Adding the following code to the library solves the issue:
The text was updated successfully, but these errors were encountered: