3#include <QtCore/QJsonDocument>
4#include <QtCore/QJsonObject>
5#include <QtCore/QJsonValue>
6#include <QtCore/QStringList>
36 const QString &expectedFileType,
37 int minSupportedVersion,
38 int maxSupportedVersion,
45 const QString &expectedFileType,
46 int minSupportedVersion,
47 int maxSupportedVersion,
55 const QString &expectedFileType,
56 int minSupportedVersion,
57 int maxSupportedVersion,
60 const QStringList &defaultTranslateKeys = {},
61 const QStringList &defaultArrayIDKeys = {});
bool validateExternalQGCJsonFile(const QJsonObject &jsonObject, const QString &expectedFileType, int minSupportedVersion, int maxSupportedVersion, int &version, QString &errorString)
bool validateInternalQGCJsonFile(const QJsonObject &jsonObject, const QString &expectedFileType, int minSupportedVersion, int maxSupportedVersion, int &version, QString &errorString)
bool isJsonFile(const QByteArray &bytes, QJsonDocument &jsonDoc, QString &errorString)
Determines whether an in-memory byte buffer contains parseable JSON content.
constexpr const char * jsonFileTypeKey
QJsonObject openInternalQGCJsonFile(const QString &jsonFilename, const QString &expectedFileType, int minSupportedVersion, int maxSupportedVersion, int &version, QString &errorString, const QStringList &defaultTranslateKeys, const QStringList &defaultArrayIDKeys)
double possibleNaNJsonValue(const QJsonValue &value)
Returns NaN if the value is null, or the value converted to double otherwise.
void saveQGCJsonFileHeader(QJsonObject &jsonObject, const QString &fileType, int version)
Saves the standard QGC file header (groundStation, fileType, version) into the json object.
QTranslator * translator()
Translator used by openInternalQGCJsonFile for localized strings.
constexpr const char * jsonVersionKey