summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md')
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md
index 238d7a56ae..4da4474b2e 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md
@@ -24,7 +24,15 @@ if (sd.Parse(schemaJson).HasParseError()) {
// the schema is not a valid JSON.
// ...
}
+
SchemaDocument schema(sd); // Compile a Document to SchemaDocument
+if (!schema.GetError().ObjectEmpty()) {
+ // there was a problem compiling the schema
+ StringBuffer sb;
+ Writer<StringBuffer> w(sb);
+ schema.GetError().Accept(w);
+ printf("Invalid schema: %s\n", sb.GetString());
+}
// sd is no longer needed here.
Document d;