License
BSD-3-Clause
CDM conversion utilities.
This module provides conversion functions between CdmNode/CdmDocument and ddn.var, as well as JSON export functionality.
var toVar(const ref CdmNode node) @safeConvert a CdmNode to a var value (lossy — strips metadata).CdmDocument fromVar(var v, CdmDocument.Format fmt) @safeConvert a var to a CdmDocument with the given format.string toJson(const ref CdmNode node, bool pretty = false) @safeConvert a CdmNode to a JSON string.string toJson(const ref CdmDocument doc, bool pretty = false) @safeConvert a CdmDocument to a JSON string.void writeIndent(ref Appender!string app, int level) pure @safeWrite indentation spaces to the appender.void toJsonImpl(
const ref CdmNode node, ref Appender!string app, int indent
) @safeRecursive JSON serialization implementation.