3 ms·
> JSON has no such mechanism built into the format. Yes, JSON Schema exists, but it is an afterthought, a third-party addition that never achieved universal ado
by xg15 9mo ago
> JSON has no such mechanism built into the format. Yes, JSON Schema exists, but it is an afterthought, a third-party addition that never achieved universal adoption.
I don't see how this is in any way more of an afterthought than XML Schema was (except that it was designed by the same group as XML)
> Namespaces. XML allows you to compose documents from multiple schemas without collision.
It "allows" it in the extremely narrow sense that you can write a file with elements from different namespaces, parse it into a DOM with a schemaless parser and can still distinguish the elements.
It does not define any semantics about what an interaction between different namespaces means or which namespaces you can and which you can't combine.