2

Can valijson be made to work with Nlohmann's json parser for schemas read from a file with references to subschemas in other files?

json mySchemaDoc;
if (!valijson::utils::loadDocument("testSchema.json", mySchemaDoc)) {
    cout << "failed to create schema";
}

Schema mySchema;
SchemaParser parser;
NlohmannJsonAdapter mySchemaAdapter(mySchemaDoc);
parser.populateSchema(mySchemaAdapter, mySchema);

I'm getting a std::runtime_error on this last line.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Jimmy Joe
  • 121
  • 8

1 Answers1

0

I'm pretty sure the problem was related to forward vs backward slashes (Unix vs Windows)...

Jimmy Joe
  • 121
  • 8