3#include <QtCore/QJsonObject>
4#include <QtCore/QStringList>
13bool validateKeyTypes(
const QJsonObject& jsonObject,
const QStringList&
keys,
const QList<QJsonValue::Type>& types,
std::array< MsgOutKey, 4 > keys
bool validateKeyTypes(const QJsonObject &jsonObject, const QStringList &keys, const QList< QJsonValue::Type > &types, QString &errorString)
bool validateKeys(const QJsonObject &jsonObject, const QList< KeyValidateInfo > &keyInfo, QString &errorString)
Validates that all required keys are present and that listed keys have the expected type.
bool validateKeysStrict(const QJsonObject &jsonObject, const QList< KeyValidateInfo > &keyInfo, QString &errorString)
Validates keys like validateKeys but also rejects any keys not listed in keyInfo.
bool validateRequiredKeys(const QJsonObject &jsonObject, const QStringList &keys, QString &errorString)
Validates that all listed keys are present in the object.
bool required
true: key must be present
QJsonValue::Type type
required type for key, QJsonValue::Null specifies double with possible NaN
const char * key
json key name