Given that YAML can be seen as a superset of JSON, are there any situations where it's better for particular tasks?
I think YAML is the best way to go for CI/CD systems.
You write all your test cases in YAML, basically various commands you need split into different sections and boom, your test executes.
In fact, I hate dealing with the UI and clicking buttons. Imagine you checkin code to GitHub and just modify your yml for your code to be deployed to your servers.
I am talking about something like this.
Mev-Rael
Executive Product Leader & Mentor for High-End Influencers and Brands @ mevrael.com
Let say, your task is to eat so you wouldn't die. You are literally asking: "In what situation I should eat banana or an apple?".
Whatever you like or the only option you have...
I never liked YAML because one tricky space can broke things and, well, I used JS much more then Python. JSON is more popular, and many APIs use JSON only.
If you want more, Almighty Google/Bing/DuckDuckGo/Whatever will help you