when to prefer one over the other

a subset of the JavaScript object notation syntax

data stored in name/value pairs

records separated by commas

field names & strings are wrapped by double quotes

stands for YAML ain't markup language and is a superset of JSON - Convert YAML to JSON