1

How can I detect the following error situation: A rapidjson::SchemaDocument is constructed from a rapidjson::Document, but the JSON contained in that Document is no proper schema; for example, { "type": "object", "properties": [1] }. Currently, all I get is an access violation when I validate a document against this faulty schema.

Thanks
Hans

h.s.
  • 139
  • 9
  • Why not validate the schema first using the meta-schema? Implementations usually have those built in, and sometimes provide a function to do the work. – Relequestual Apr 08 '22 at 14:19
  • @Relequestual, I had thought about that, but how can I be sure that the metaschema matches the implementation in rapidjson? – h.s. Apr 09 '22 at 16:17

0 Answers0