2 ms·
It 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.o
by aidenn0 5y ago
It 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.