QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
JsonSchemaValidator Namespace Reference

Functions

bool validate (const QJsonDocument &doc, const QString &schemaResourcePath, QString &errorString)

Function Documentation

◆ validate()

bool JsonSchemaValidator::validate ( const QJsonDocument & doc,
const QString & schemaResourcePath,
QString & errorString )

Validates doc against the JSON-Schema bundled at schemaResourcePath (e.g. ":/json/component_metadata/parameter.schema.json").

Returns
true if doc conforms; on failure returns false and fills errorString with the validation failures.

Definition at line 79 of file JsonSchemaValidator.cc.

References validate().

Referenced by CompInfoActuators::setJson(), CompInfoGeneral::setJson(), CompInfoParam::setJson(), ComponentInformationTranslation::translateJsonUsingTS(), and validate().