>  3.  Generate validation code that can emit informative messages about
failed validation.

Valijson ( https://github.com/tristanpenman/valijson ) apparently supports Boost.Json for schema validation, although I haven't used it personally.

Most C++ implementations of schema validation don't support a lot of the newer JSON schema versions. You could take a look at some of the C++ tools at https://json-schema.org/tools?query=&sortBy=name&sortOrder=ascending&groupBy=toolingTypes&licenses=&languages=&drafts=&toolingTypes=&environments=

Regards,
Alex Simpson