serialize Node To Json Ml
Type: Function
How to get serializeNodeToJsonMl?
JavaScript
import serializeNodeToJsonMl from 'fontoxml-dom-utils/src/serializeNodeToJsonMl.js'
Creates a JsonML representation for the given node.
JsonML is always expected to be a JavaScript structure. If you need a string of JSON, use JSON.stringify afterwards.
As Document nodes are not supported in JsonML, pass Document.documentElement if you need the JsonML representation of a complete document, otherwise Document will be represented as an element with an unexpected nodeName. This will not round-trip.
Arguments
node
(Required)
Type: Node
Root node of the structure to convert.
Returns
Type: JsonML