private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) { Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver, dumperOptions, rootTag); try { serializer.open(); while (data.hasNext()) { Node node = representer.represent(data.next()); serializer.serialize(node); } serializer.close(); } catch (IOException e) { throw new YAMLException(e); } }
/** * Serialize the representation tree into Events. * * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a> * @param data * representation tree * @return Event list */ public List<Event> serialize(Node data) { SilentEmitter emitter = new SilentEmitter(); Serializer serializer = new Serializer(emitter, resolver, dumperOptions, null); try { serializer.open(); serializer.serialize(data); serializer.close(); } catch (IOException e) { throw new YAMLException(e); } return emitter.getEvents(); }
private void dumpAll(Iterator<? extends Object> data, Writer output, Tag rootTag) { Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver, dumperOptions, rootTag); try { serializer.open(); while (data.hasNext()) { Node node = representer.represent(data.next()); serializer.serialize(node); } serializer.close(); } catch (java.io.IOException e) { throw new YAMLException(e); } }
/** * Serialize the representation tree into Events. * * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a> * @param data * representation tree * @return Event list */ public List<Event> serialize(Node data) { SilentEmitter emitter = new SilentEmitter(); @SuppressWarnings("deprecation") Serializer serializer = new Serializer(emitter, resolver, dumperOptions, dumperOptions.getExplicitRoot()); try { serializer.open(); serializer.serialize(data); serializer.close(); } catch (java.io.IOException e) { throw new YAMLException(e); } return emitter.getEvents(); }
private void dumpAll(final Iterator<? extends Object> data, final Writer output, final Tag rootTag) { Serializer serializer = new Serializer(new Emitter(output, dumperOptions), resolver, dumperOptions, rootTag); try { serializer.open(); while (data.hasNext()) { Node node = representer.represent(data.next()); serializer.serialize(node); } serializer.close(); } catch (java.io.IOException e) { throw new YAMLException(e); } }
/** * Serialize the representation tree into Events. * * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a> * @param data * representation tree * @return Event list */ public List<Event> serialize(final Node data) { SilentEmitter emitter = new SilentEmitter(); @SuppressWarnings("deprecation") Serializer serializer = new Serializer(emitter, resolver, dumperOptions, dumperOptions.getExplicitRoot()); try { serializer.open(); serializer.serialize(data); serializer.close(); } catch (java.io.IOException e) { throw new YAMLException(e); } return emitter.getEvents(); }