3 ms·
This is at odds with the top comment here suggesting there are edge case bugs. Assuming validly heroku wouldn’t use something buggy like that either the top com
by ramraj07 5y ago
This is at odds with the top comment here suggesting there are edge case bugs. Assuming validly heroku wouldn’t use something buggy like that either the top comment is wrong or heroku uses two different parsers after inferring type.
- bin_bash 5y agothe top comment is wrong, YAML 1.2+ is a strict superset of JSON
- CameronNemo 5y agoMany parsers either default to YAML pre-1.2 or do not even expose a YAML 1.2 option. PyYAML has no 1.2 option, for example. So unless Ansible is using something other than PyYAML... Relevant (open) PR: https://github.com/yaml/pyyaml/pull/555 https://github.com/yaml/pyyaml/pull/555
- IggleSniggle 5y agoUnfortunately, it claims to be, but is not an actual strict superset.
- lelandbatey 5y agoThe top comment quotes an implementor of a YAML parser, an implementor who in an addendum specifically calls out YAML 1.2 as STILL not being a superset of JSON: > Addendum/2009: the YAML 1.2 spec is still incompatible with JSON, even though the incompatibilities have been documented (and are known to Brian) for many years and the spec makes explicit claims that YAML is a superset of JSON. It would be so easy to fix, but apparently, bullying people and corrupting userdata is so much easier.
- aidenn0 5y agoIt is not. YAML 1.2.2 disallows the C1 block and the surrogate block[1], while JSON allows anything except the C0 block in quoted strings[2] 1: https://yaml.org/spec/1.2.2/#chapter-5-character-productions https://yaml.org/spec/1.2.2/#chapter-5-character-productions 2: https://www.json.org/json-en.html https://www.json.org/json-en.html
- Thom1729 5y agoFrom later in 5.1: > To ensure JSON compatibility, YAML processors must allow all non-C0 characters inside quoted scalars. The wording here is admittedly confusing, but it does ensure that YAML can handle all JSON strings.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]