8#include "utils/version.h"
10#include <nlohmann/json_fwd.hpp>
12namespace zrythm::structure::project
23namespace zrythm::controllers
26using namespace std::string_view_literals;
42 static constexpr auto DOCUMENT_TYPE =
"ZrythmProject"sv;
43 static constexpr auto kProjectData =
"projectData"sv;
44 static constexpr auto kUiState =
"uiState"sv;
45 static constexpr auto kUndoHistory =
"undoHistory"sv;
46 static constexpr auto kDatetimeKey =
"datetime"sv;
47 static constexpr auto kTitle =
"title"sv;
64 std::string_view title);
84 const nlohmann::json &j,
Handles serialization, deserialization, and validation of project JSON.
static void validate_json(const nlohmann::json &j)
Validates JSON against the project schema.
static nlohmann::json serialize(const structure::project::Project &project, const structure::project::ProjectUiState &ui_state, const undo::UndoStack &undo_stack, const utils::Version &app_version, std::string_view title)
Returns a json representation of the project.
static void deserialize(const nlohmann::json &j, structure::project::Project &project, structure::project::ProjectUiState &ui_state, undo::UndoStack &undo_stack)
Loads and validates a project from JSON.
Serializable UI state for a project.
Core functionality of a Zrythm project.
Represents a semantic version with major, minor, and optional patch.