static LoadResult Fson::load( std::string const& filename );
Parses filename, resolving every %include directive, and returns a LoadResult.
- Never throws. A parse error is recorded in
result.errorsand parsing resynchronises at the next,/}/]; a failed member value becomes aNullplaceholder. result.documentis null only when the file cannot be opened. A malformed file still yields a partialDocumentplus the error list.result.ok()istruewhen a document was produced and nothing worse than aWarningwas recorded — check it before trusting or re-writing the document.
auto result = Fson::load( "config.fson" );
for( auto const& e : result.errors )
std::cerr << e.filename << ':' << e.line << ':' << e.col
<< ": " << e.message << '\n';
if( !result.ok() )
return 1;
Document& doc = *result.document;
%include resolution
Before returning, load merges defaults (host wins, shallow), binds aliases, resolves relative targets against the including file's directory, and detects cycles — all reported as errors, never thrown. The resolved document's query view is the merged result; save writes only the host file back. See Include Files and Object — dotted paths (provenance).

