You can parse JSON in a streaming fashion with many libraries. You just don't know at the beginning if it is going to be valid or not.
---
foo: 1
...
Your application can mandate usage of these. But yeah, not ideal.I believe that's only true if one were to load YAML via the "SAX"-style per-event stream, and not the "object materialization" that normal apps use (aka `yaml.load_all` or JAX-B objects) since in those more data-object centric views, where would one put the processing events for those markers?
I also originally expected `yaml.parse(...)` to eat them as it does for comments and extraneous whitespace, but no, it does in fact return dedicated stream events for them, so TIL