mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
JsonCpp to QTJson (Part 4) (#266)
* Update ActiveEffectDefinition.h * Update EffectDefinition.h * Update EffectEngine.h * Update Hyperion.h * Update LedDevice.h * Update QJsonFactory.h * Update QJsonSchemaChecker.h * Update Effect.cpp * Update Effect.h * Update EffectEngine.cpp * Update Hyperion.cpp * Update JsonClientConnection.cpp * Update JsonClientConnection.h * Update schema-config.json * Update LedDevice.cpp * Update QJsonSchemaChecker.cpp * Update hyperion-remote.cpp * Update JsonConnection.cpp * Update JsonConnection.h * Update hyperiond.cpp
This commit is contained in:
committed by
redPanther
parent
0a142b0e7d
commit
d9c2a2d91a
@@ -26,9 +26,10 @@ bool QJsonSchemaChecker::setSchema(const QJsonObject & schema)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QJsonSchemaChecker::validate(const QJsonObject & value)
|
||||
bool QJsonSchemaChecker::validate(const QJsonObject & value, bool ignoreRequired)
|
||||
{
|
||||
// initialize state
|
||||
_ignoreRequired = ignoreRequired;
|
||||
_error = false;
|
||||
_messages.clear();
|
||||
_currentPath.clear();
|
||||
@@ -183,7 +184,7 @@ void QJsonSchemaChecker::checkProperties(const QJsonObject & value, const QJsonO
|
||||
{
|
||||
validate(value[property], propertyValue.toObject());
|
||||
}
|
||||
else if (required != propertyValue.toObject().end() && required.value().toBool())
|
||||
else if (required != propertyValue.toObject().end() && required.value().toBool() && !_ignoreRequired)
|
||||
{
|
||||
_error = true;
|
||||
setMessage("missing member");
|
||||
|
Reference in New Issue
Block a user