#include "fson/Fson.hh"

Fson is a static façade — it has no instances, only static functions for the common cycle. Errors are returned, never thrown.

FunctionPurpose
load(filename) → LoadResultparse a file (resolving %include)
save(document, filename) → boolpretty-print to a file
dependenciesOf(filename) → std::set<std::string>the file set to watch, without keeping a document
snapshot(filename) → Snapshotrecord mtime / size / content hash of every covered file
isStale(filename, snapshot, mode = MtimeSize) → boolhas anything changed since the snapshot

load resolves %include directives before returning: merges defaults (host wins, shallow), binds aliases, resolves relative targets against the including file's directory, and reports missing targets and cycles as errors. See Include directives for the semantics and Object — dotted paths for the provenance API that locates a resolved value's origin file.

StaleMode is enum class StaleMode { MtimeSize, ContentHash }.