Reject duplicate keys and multiple documents instead of silently editing
them. Validate rendered output before writing so edits cannot leave
dangling aliases or introduce duplicate keys. Errors leave files untouched.
Apply the same validation to YAMLText.
JSONToYAML now rejects duplicate keys without creating or replacing the
target, including omp's models.json conversion. Treat a document containing
only --- as empty, matching the top-level YAML editor.
Add regression tests for document loss, dangling aliases and duplicate
keys, alongside existing-behavior coverage for malformed input.