Hi there, I've looked into YAMLEncoder and everything looks great. Did have one request though, to have an option to output arrays / sequences via a single line "flow" style (like so):
items: [a, b, c]
Versus how it currently outputs in "block" format:
items:
-- a
-- b
-- c
I noticed that the YAMLDecoder can accept arrays in either flow / non-flow format, but I don't see any way to get them written in single-line flow format from within YAMLEncoder.
Ideally, this might be something configurable via YAMLEncoder.Options.
Perhaps .sequenceStyle = .flow or something similar.
Hi @jpsim , I've created a PR for this, please see it here. I've tried to make the changes minimally intrusive, but please feel free to make further changes were you might see fit.
Hi there, I've looked into
YAMLEncoder
and everything looks great. Did have one request though, to have an option to output arrays / sequences via a single line "flow" style (like so):items: [a, b, c]
Versus how it currently outputs in "block" format:
I noticed that the
YAMLDecoder
can accept arrays in either flow / non-flow format, but I don't see any way to get them written in single-line flow format from withinYAMLEncoder
.Ideally, this might be something configurable via
YAMLEncoder.Options
. Perhaps.sequenceStyle = .flow
or something similar.