As a data format, yaml is extremely complicated and it has many footguns. In this post I explain some of those pitfalls by means of an example, and I suggest a few simpler and safer yaml alternatives.
A 10 minute read covering some YAML edge-cases that you should have in mind when writing complex YAML files
If you keep it simple, then probably JSON is easier. In other cases too.
JSON is not easier for most strings. Anything multiline for example.
But yaml is a superset of JSON so you literally can use JSON and it’s still valid YAML.