QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
JsonParsing.h File Reference
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject>
#include <QtCore/QJsonValue>
#include <QtCore/QStringList>
#include "JsonValidation.h"
+ Include dependency graph for JsonParsing.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  JsonParsing
 

Functions

bool JsonParsing::isJsonFile (const QString &fileName, QJsonDocument &jsonDoc, QString &errorString)
 Determines whether a file path contains parseable JSON content.
 
bool JsonParsing::isJsonFile (const QByteArray &bytes, QJsonDocument &jsonDoc, QString &errorString)
 Determines whether an in-memory byte buffer contains parseable JSON content.
 
double JsonParsing::possibleNaNJsonValue (const QJsonValue &value)
 Returns NaN if the value is null, or the value converted to double otherwise.
 
QTranslator * JsonParsing::translator ()
 Translator used by openInternalQGCJsonFile for localized strings.
 
void JsonParsing::saveQGCJsonFileHeader (QJsonObject &jsonObject, const QString &fileType, int version)
 Saves the standard QGC file header (groundStation, fileType, version) into the json object.
 
bool JsonParsing::validateExternalQGCJsonFile (const QJsonObject &jsonObject, const QString &expectedFileType, int minSupportedVersion, int maxSupportedVersion, int &version, QString &errorString)
 
bool JsonParsing::validateInternalQGCJsonFile (const QJsonObject &jsonObject, const QString &expectedFileType, int minSupportedVersion, int maxSupportedVersion, int &version, QString &errorString)
 
QJsonObject JsonParsing::openInternalQGCJsonFile (const QString &jsonFilename, const QString &expectedFileType, int minSupportedVersion, int maxSupportedVersion, int &version, QString &errorString, const QStringList &defaultTranslateKeys, const QStringList &defaultArrayIDKeys)
 

Variables

constexpr const char * JsonParsing::jsonVersionKey = "version"
 
constexpr const char * JsonParsing::jsonFileTypeKey = "fileType"