Yes, I agree that YAML for Ansible is thoroughly nested. And that’s where the JSON hierarchical/tree approach makes sense.
It occurs to me that if @agiletortoise did this metadata parsing he’d be best off with a good quality open source library. (Assuming such a thing exists in a form that Drafts can use.)