28#include "flightlog/Flight.h"
39class FlightLogExportJSON
42 FlightLogExportJSON() =
delete;
49 [[nodiscard]]
static auto toJSON(
const Flight& flight) -> QJsonObject;
63 [[nodiscard]]
static auto toJSON(
const QList<Flight>& flights) -> QByteArray;
71 [[nodiscard]]
static auto fromJSON(
const QByteArray& content) -> QList<Flight>;
89 [[nodiscard]]
static auto isValid(
const QString& fileName, QString* info =
nullptr) -> bool;
static auto isValid(const QString &fileName, QString *info=nullptr) -> bool
Check if a file contains valid flight log JSON data.
static auto fromJSON(const QJsonObject &json) -> Flight
Deserialize a single flight from JSON.
static auto toJSON(const QList< Flight > &flights) -> QByteArray
Generate JSON content for a list of flights.
static auto fromJSON(const QByteArray &content) -> QList< Flight >
Parse a list of flights from JSON content.
static auto toJSON(const Flight &flight) -> QJsonObject
Serialize a single flight to JSON.
A single flight log entry.