Closed alexec closed 4 years ago
Would you mind giving an example of YAML stream you have? just to be sure we are talking about muli-documents YAML rather than a YAML file with an array of objects.
I should be able to write an example with your sample input :)
YAML streams are just .yaml
files with ---
to delimit them. E.g.
https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/install.yaml
I have found a way to do this:
read(
"/resources/upstream.yaml",
{ format: Format.YAMLStream }
)
Yes, std.Format.YAMLStream
is what you want -- you get an array of the documents. There's no actual streaming reads or writes, for now.
Alex, can we close this one?
I have a YAML file that contains multiple objects. A YAML stream.
I can't see how to iterate over it?