Closed yahooguntu closed 2 years ago
Thank you for your bugreport. I will fix this tonight.
Hello! Thank you again for your bugreport! This should now be fixed. https://godbolt.org/z/9rhTsrMa5 Please note that the JSON and C++ members leading to errors are accessible in the ParseContext through the members:
std::vector<std::string> missing_members;
std::vector<std::string> unassigned_required_members;
and that they are populated even though the allow_* members are true.
Please don't hesitate to file other bugs/requests.
Thanks for the quick fix, and thanks for publishing such a great library!
I believe I found a bug when setting
allow_missing_members
orallow_unassigned_required_members
. In the example below,parseTo()
does indeed return an error (in one of my tests, aJS::Error::MissingPropertyMember
), but whenmakeErrorString()
is called it returns "Error NoError:".Output:
Error parsing struct: Error NoError:
Expected: either a
MissingPropertyMember
orUnassignedRequiredMember
error string, depending on the circumstances.