The key difference which separates a JSON file from a YAML file is that YAML is a superset of JavaScript Object Notation (JSON) but has some built-in advantages. For example, YAML can self-reference, support complex datatypes, embed block literals, support comments, and more. Overall, YAML tends to be more readable than JSON as well.