mrdocs::toDomObject

Parse a YAML document into a DOM object.

Synopsis

Declared in <mrdocs/Config.hpp>

dom::Object
toDomObject(std::string_view yaml);

Description

Unknown keys are preserved and scalars are converted to the matching DOM type (integer, then boolean, then null, otherwise string). The result is empty when the YAML is empty or its root is not a mapping.

Return Value

The parsed DOM object.

Parameters

NameDescription
yamlThe YAML document to parse.