toJson
Convert a CdmNode to a JSON string.
Parameters
node | The CdmNode to serialize. |
pretty | If true, produce indented output with 2-space indent. |
Returns
A JSON string representation of the node.
Convert a CdmDocument to a JSON string.
Delegates to toJson on the document's root node.
Parameters
doc | The CdmDocument to serialize. |
pretty | If true, produce indented output with 2-space indent. |
Returns
A JSON string representation of the document root.