logoalt Hacker News

fodkodrasztoday at 10:04 AM2 repliesview on HN

> YAML is (or at least, is declared by its maintainers to be) a superset of JSON, making any JSON document also a valid YAML document. > So surely if YAML is streamable, JSON must be too?

Given YAML is not a subset, but a superset of JSON, as you correctly noted, I'm not sure how you reached that conclusion.

> Or are the YAML maintainers incorrect?

I think you should check this page before making snarky comments: https://en.wikipedia.org/wiki/Superset

See also the comment below: https://news.ycombinator.com/item?id=49476489

Offtopic note: I wanted to dig the wiki superset link up the lazy way, so searched for superset, and all I got was endless list of marketing trash links. Even on DDG. RIP, we are on the Dead Internet.


Replies

feelameetoday at 10:20 AM

He misspelled subset/superset, but the idea with streaming is right.

Given: - YAML support streaming - any JSON is valid YAML

Conclusion - any JSON is streaming

show 1 reply
feelameetoday at 10:27 AM

I think you should check this page before making snarky comments: https://en.wikipedia.org/wiki/Inference

See Examples section.