cblp / yaml-sucks

YAML sucks.
606 stars 16 forks source link

Unicode input is about JSON encoders, not about YAML. #13

Open ElectronicRU opened 5 years ago

ElectronicRU commented 5 years ago

The last row of the table is misleading -- JSON spec has escape sequences, so the string is the same in all cells, but is expressed differently in JSON.

champignoom commented 3 years ago

Indeed. Adding ensure_ascii=False to json.dumps() should eliminates the difference.

ssokolow commented 3 years ago

The primary objective of this revision is to bring YAML into compliance with JSON as an official subset. -- https://yaml.org/spec/1.2/spec.html

(As of YAML 1.2, it's officially intended that all valid JSON can be parsed as valid YAML.)

champignoom commented 3 years ago

@ssokolow How's that relevant here?

ssokolow commented 3 years ago

...it's not. I underestimated how sleep-deprived I am and misread the issue.

Sorry about that.