tristanpenman / valijson

Header-only C++ library for JSON Schema validation, with support for many popular parsers
BSD 2-Clause "Simplified" License
351 stars 105 forks source link

How can we validate boolean type if it is string in .json? #189

Open phuchm opened 9 months ago

phuchm commented 9 months ago

I use boost c++ to read/write .json file. The problem here is boost will automatically escape (convert) to string type. Therefore, if I create a json object with integer and boolean type, all of us will come string type in .json file. I use Validator validator(Validator::kWeakTypes) to face with integer type but it still doesn't work with boolean type.

How can I resolve it?