4 ms·
And the flip side of that with YAML is you can stream it, but you don't know once you've gotten to the end if it was the whole document without some user define
by lkschubert8 5y ago
And the flip side of that with YAML is you can stream it, but you don't know once you've gotten to the end if it was the whole document without some user defined checksum mechanism.
- spullara 5y agoRan into a great bug with the INI format which has the same issue. The application would read the config file on modification but if you just wrote over the file it would sometimes read the config before the file was fully written. Have to use a temp file and move it rather than just edit it.
- gray_-_wolf 5y agoIt's possible to have document start and end markers in yaml: --- foo: 1 ... Your application can mandate usage of these. But yeah, not ideal.
- mdaniel 5y ago> Your application can mandate usage of these 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