4 ms·
> JSON is also valid YAML That's false. http://p3rl.org/JSON::XS#JSON-and-YAML http://p3rl.org/JSON::XS#JSON-and-YAML
by bmn__ 5y ago
> JSON is also valid YAML
That's false. http://p3rl.org/JSON::XS#JSON-and-YAML http://p3rl.org/JSON::XS#JSON-and-YAML
- GoblinSlayer 5y agoOuch, I routinely see \/ in json in the wild. What happens outside of BMP? JSON escapes surrogate pair as two UTF-16 code units separately.
- smt88 5y agoThat link is from more than 10 years ago and is no longer accurate as of YAML 1.2[1]. Perfect JSON compatibility has always been a stated goal of YAML and is something they consider to be a bug when it's found to be broken at the spec level. 1. https://yaml.org/spec/1.2.2/ https://yaml.org/spec/1.2.2/
- bmn__ 5y agoIf you read the linked document carefully, then you will notice that YAML 1.2 existed twelve years ago, the incompatibility has not been addressed as suggested and remains still a problem for the end users.