License
BSD-3-Clause
CDM document root container.
This module provides the CdmDocument struct which serves as the root container for a parsed configuration document, holding the root node, format metadata, and document-level comments.
Root container for a parsed configuration document.
CdmDocument encapsulates a complete parsed configuration file, including the root node, detected format, source location, and any comments that appear before or after the root content.
auto doc = CdmDocument(CdmDocument.Format.JSON);
doc.source = "config.json";
doc.root = CdmNode.emptyObject();
doc.root["name"] = CdmNode("myapp");
assert(!doc.empty);Format formatThe detected or specified formatstring sourceSource file path or URICdmNode rootThe root node of the documentCdmComment[] prologCommentsComments appearing before the root elementCdmComment[] epilogCommentsComments appearing after the root elementstring encodingCharacter encoding (default UTF-8)FormatThe detected or specified document format.