-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Determine the type from error message. #720
Comments
I assume you're using Visual Studio, which doesn't show a stack trace after the Meanwhile you can modify // Somewhere in nlohmann::detail
struct from_json_fn {
static void call(T arg) {
arg.show_me_the_type();
}
}; Do the same inside |
Hi. Yes i use Visual studio. Ok thanks for the information. Do I have to add this static void call(T arg) { inside "struct from_json_fn" or just the arg.show_me_the_type(); to the existing call? |
Sorry I was on my phone, so hard to be explicit. You have to add it to the existing call, the one with the |
Sorry. this one:
where to find the arg? |
You have to add it: void call(const BasicJsonType&, T& arg, priority_tag<0>) const noexcept |
Oh... I missed this :-) |
Yes it is. I have this in my TODO list, it will be done in 3.0 by default. |
Hm ok. But I do not understand why arg.show_me_the_type(); is only called if the static_assert is false. |
In fact, this |
Ok. Thanks for the Explanation. |
@theodelrieu Thanks a lot for taking care of this issue! |
I get the erros
"could not find to_json() method in T's namespace"
"could not find from_json() method in T's namespace"
but I do not know for which type the methods are not found. How do I get this information?
The text was updated successfully, but these errors were encountered: