We want this esp for `mark`, `start`, `end`, `active` and `anchor`. But I think we could do it for any object that is simple, the same way that [pyyaml does](https://pyyaml.org/wiki/PyYAMLDocumentation#dictionaries-without-nested-collections-are-not-dumped-correctly). This should be easy to do using something like [this](https://github.com/nodeca/js-yaml/issues/613#issuecomment-814319894), but checking type of all values of object / array to see if any are object or array