Open jacquev6 opened 1 year ago
Maybe you could try the conversion and catch the BadConversion
but I'm not familiar enough with either yaml-ccp or valijson to be sure that's the right way. Something like:
bool isInteger() const
{
try {
m_value.as<int64_t>();
return true;
} catch (const YAML::BadConversion&) {
return false;
}
}
Hello and thank you for this library!
I get false validation errors for schemas with a
type
constraint forboolean
,number
andinteger
when using the yaml-cpp adapter. See code below to reproduce the issue.I believe this is because the
isBool
,isDouble
,isInteger
,isNumber
andisString
methods inyaml_cpp_adapter.hpp
return literaltrue
s andfalse
s.Code to reproduce the issue:
Thank you!