Is there a tool that parses yaml and outputs json, so you could check if the yaml you wrote parses as you intent?
gojq (https://github.com/itchyny/gojq) and fq (https://github.com/wader/fq) can read YAML and output JSON.
But that won't nescessarily help, because other parsers can intepreret that YAML differently.