> 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.
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.
The "streamed JSON" needs --- line sparators, which is not a JSON spec feature, thus that data stream is valid YAML from that point, bot not a valid JSON stream.
How was my comment snarky? The YAML maintainers may have intended YAML to be a superset of JSON, but failed by not incorporating some obscure feature of it that bore on whether it was streamable or not.
I wrote a C++ library at work that, among other things, serializes/deserializes to JSON, CBOR and BSON. I don't get that point.
The first two formats I've implemented as fully streaming, the serializers emit into an output iterator one character/byte at a time and the deserializers only need to hold one value at a time (mostly for strings, and not even for CBOR's byte arrays, which are streamed). BSON requires full document instantiation because of byte offsets and is genuinely anti-streaming in its design.
I happen to have implemented a serializer for YAML, fully streaming, mostly as a compact-ish human-readable debug data representation. I can scarcely think of fates worse than having to write a spec-compliant YAML parser.
1) Most Commonwealth countries are republics, not monarchies.
2) The monarchies in the Commonwealth countries are ruled by different crowns; but, for historical reasons, most of those crowns are worn by the same physical head. (But not all of them. The King of Malaysia is a different natural person from the King of the UK, for example.)
The Scottish NHS has always been a separate organisation, even before devolution, created under a separate Act of Parliament. It's just that it used to be answerable to the UK government (specifically to the Secretary of State for Scotland, rather than the Secretary of State for Health), and now it's answerable to the Scottish government.
Why it was done like that, I'm not sure, but I suspect it was a combination of Scotland having its own legal system and laws (guaranteed by the Acts of Union of 1707) and existing ministerial division of responsibility (where public health in Scotland fell within the purview of the Scottish Secretary, along with Scottish education and a bunch of other areas that had their own distinct Cabinet ministers for England and Wales).
And while the Welsh NHS was originally part of the same NHS as operated in England, control over the NHS in Wales passed from the Health Secretary to the Welsh Secretary with the creation of the Welsh Office in 1969, and then to the devolved Welsh government in 1999.
Northern Ireland already had devolution (or to be precise, home rule) when the NHS was created in 1948, and the Northern Irish equivalent -- the Health and Social Care service -- is a direct creation of the Parliament of Northern Ireland rather than of the UK Parliament.
No doubt there are "reasons" for all of them, but it's so far in the past and so far removed from my cultural experience as to be irrelevant and functionally nonsensical.
This does give me a reason to preserve some fact about one of my favorite cats ever in perpetuity (given the similarity of the John / Jack transition to Joe the Cat's life).
A friend's cat (who I knew as Joe the Cat) went from being called "Ivy" to "Joe" over the course of the cat's 15+ year lifetime by way of being called, successively: Ivy --> Jivey --> Jive --> Java --> Joe
Joe was calm and compliant, and arguably "a good kitty" (albeit I only knew him late in his life). My friend once described Joe as being more frantic in his youthful vigor but being "pacified through years of routine and systematic abuse".
No, my friend and his and his family didn't actually abuse Joe the Cat. He was much loved. I get to use the phrase "years of routine and systematic abuse" in my life (as often as possible!) now, though (often referring to my experiences with various pieces of software).
Traditionally, yes; these days, perhaps not so much.
The author Jack London was originally John London. John F. Kennedy was familiarly known as Jack ("Senator, you're no Jack Kennedy"). The British racing driver John Stewart is far more commonly known as Jackie Stewart. In Patrick O'Brian's naval fiction, Captain John Aubrey is almost always referred to as Jack.
So surely if YAML is streamable, JSON must be too?
Or are the YAML maintainers incorrect?