use of org.yaml.snakeyaml.emitter.Emitter in project configuration-as-code-plugin by jenkinsci.
the class ConfigurationAsCode method serializeYamlNode.
// for testing only
@Restricted(NoExternalUse.class)
public static void serializeYamlNode(Node root, Writer writer) throws IOException {
DumperOptions options = new DumperOptions();
options.setDefaultFlowStyle(BLOCK);
options.setDefaultScalarStyle(PLAIN);
options.setSplitLines(true);
options.setPrettyFlow(true);
Serializer serializer = new Serializer(new Emitter(writer, options), new Resolver(), options, null);
serializer.open();
serializer.serialize(root);
serializer.close();
}
Aggregations