JSON and YAML can describe the same data, so the choice comes down to who (or what) reads and writes the file. JSON is strict, small, and easy for software to parse. YAML is looser and friendlier for humans to edit.
Source: [Dev.to](https://dev.to/pulkitgovrani/json-vs-yaml-when-to-use-which-3n6b)