4 ms·
YAML is a superset of JSON. Which means anything that accepts YAML accepts JSON. So you can write your Github action code in JSON (with a yml file extension).
by ccouzens 5y ago
YAML is a superset of JSON.
Which means anything that accepts YAML accepts JSON.
So you can write your Github action code in JSON (with a yml file extension).
- bmn__ 5y ago> YAML is a superset of JSON. That's false. http://p3rl.org/JSON::XS#JSON-and-YAML http://p3rl.org/JSON::XS#JSON-and-YAML
- ccouzens 5y agoInteresting. Thanks for bringing that to my attention. It sounds like the differences are unlikely to be encountered in conventional config files, especially those written by hand. From that link I understand the source of problems to be: Object keys longer than 1024 "stream characters". But these wouldn't be valid in any other yaml syntax either. Some Unicode characters in strings (characters outside of BMP). An escape sequence that is technically valid in JSON but never required.