rigProject 0.1.1
RigKit pack API - rigProject
Loading...
Searching...
No Matches
ProjectJson.h File Reference

Ordered JSON read and write for Rig documents, plus the Contract version stamp. More...

#include <filesystem>
#include <fstream>
#include <spdlog/spdlog.h>
#include <string>
#include "core/json.h"
Include dependency graph for ProjectJson.h:
This graph shows which files directly or indirectly include this file:

Typedefs

using rigkit::project::ordered_json = nlohmann::ordered_json
 Preserves key order in .rigdoc files.

Variables

constexpr const char * rigkit::project::kContractVersion = "0.33.0"
 Contract version stamped into the rig field of every document we write.
constexpr int rigkit::project::kFormatMajor = 1
 Host document format this writer emits (format_major / format_minor).

Detailed Description

Ordered JSON read and write for Rig documents, plus the Contract version stamp.

Both helpers log and return empty on failure rather than throwing.

Variable Documentation

◆ kContractVersion

const char* rigkit::project::kContractVersion = "0.33.0"
inlineconstexpr

Contract version stamped into the rig field of every document we write.

Tracks the vendored RigWorks in docs/contract/RigWorks/VERSION. Bump both together, and only after the writer actually emits what that version says.

◆ kFormatMajor

int rigkit::project::kFormatMajor = 1
inlineconstexpr

Host document format this writer emits (format_major / format_minor).

Readers reject a larger major and read smaller minors via legacy-key fallbacks. 1.1 = unit-agnostic item keys (size, baseline, pos) per the RigWorks measurements rule; 1.0 wrote sizeMm / baselineMm.