Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
project_loader.h
1// SPDX-FileCopyrightText: © 2026 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include <filesystem>
7#include <string>
8
9#include "utils/utf8_string.h"
10
11#include <nlohmann/json.hpp>
12
13namespace zrythm::structure::project
14{
15
27{
28public:
33 {
34 nlohmann::json json;
36 fs::path project_directory;
37 };
38
46 static LoadResult load_from_directory (const fs::path &project_dir);
47
55 static std::string
56 get_uncompressed_project_text (const fs::path &project_dir);
57
65 static nlohmann::json parse_and_validate (const std::string &json_str);
66
73 static utils::Utf8String extract_title (const nlohmann::json &j);
74};
75
76}
Handles loading of Zrythm projects from disk.
static LoadResult load_from_directory(const fs::path &project_dir)
Loads and validates a project from the specified directory.
static nlohmann::json parse_and_validate(const std::string &json_str)
Parses JSON string and validates against schema.
static std::string get_uncompressed_project_text(const fs::path &project_dir)
Reads and decompresses the project file.
static utils::Utf8String extract_title(const nlohmann::json &j)
Extracts the project title from JSON metadata.
Lightweight UTF-8 string wrapper with safe conversions.
Definition utf8_string.h:38