License
BSD-3-Clause
CDM (Configuration Data Model) package.
A unified data model for configuration file formats with full roundtrip fidelity. CDM preserves all metadata needed to read, modify, and write back configuration files without losing comments, formatting, or structural details.
The core types are:
CdmNode - The primary node type for all valuesCdmDocument - Root container for a parsed documentCdmLocation - Source location trackingCdmComment - Preserved commentsCdmFormat - Formatting metadataCdmMember - Object key-value pairs with roundtrip metadataCdmAttribute - SDL tag attributesConfigStore - Lightweight config with format-preserving saveBuilder pattern:
CdmBuilder - Produces CdmDocument with full metadataVarBuilder - Produces lightweight var without metadataConversion utilities:
toVar() - Convert CdmNode to ddn.varfromVar() - Convert ddn.var to CdmNodetoJson() - Export to JSON stringTraversal utilities:
traverse() - Depth-first traversalfindAll() - Find nodes matching a predicatefindFirst() - Find first node matching a predicatefindByType() - Find nodes by typefindByKey() - Find objects containing a key