Search in sources :

Example 1 with DataModelWriter

use of io.apicurio.datamodels.core.io.DataModelWriter in project apicurio-data-models by Apicurio.

the class Library method writeNode.

/**
 * Called to serialize a given data model node to a JSON object.
 * @param node
 */
public static Object writeNode(Node node) {
    DataModelWriter writer = VisitorFactory.createDataModelWriter(node.ownerDocument());
    visitTree(node, writer, TraverserDirection.down);
    return writer.getResult();
}
Also used : DataModelWriter(io.apicurio.datamodels.core.io.DataModelWriter)

Aggregations

DataModelWriter (io.apicurio.datamodels.core.io.DataModelWriter)1