fromVar
Convert a var to a CdmNode (default formatting).
Creates a new CdmNode tree from a var value. Object vars that contain a #name key are converted to TAG nodes; other objects become CdmNode objects.
Acyclicity precondition: the resulting node graph is expected to remain acyclic. If callers later introduce pointer cycles via member/attribute value pointers, recursive consumers may not terminate.
Parameters
v | The var value to convert. |
Returns
A CdmNode representing the var value.
Throws
ConvException if an unsigned integer exceeds the CdmNode integer
range (long.max) and cannot be represented as INTEGER.
Convert a var to a CdmDocument with the given format.
Parameters
v | The var value to convert as the document root. |
fmt | The document format to set. |
Returns
A CdmDocument with the specified format and converted root node.