3 ms·
Consider the case of embedding (composition is better than inheritance) data defined by a second schema inside a first schema. To quote The Zen of Python, "Nam
by svieira 4y ago
Consider the case of embedding (composition is better than inheritance) data defined by a second schema inside a first schema. To quote The Zen of Python, "Namespaces are one honking great idea -- let's do more of those!". But no other format does embedding in any reasonable way (it's all ad hoc extensions on top of your serialization format).
- pydry 4y ago>Consider the case of embedding (composition is better than inheritance) data defined by a second schema inside a first schema. What do you mean by this "data defined by a second schema inside a first schema"? And why is it a good idea?
- dale_glass 4y agoYou have a text document (eg, LibreOffice) which is XML, and want to embed a SVG in it (which is also XML). XML has tools to deal with this situation, where it knows that what's found inside <picture></picture> can be evaluated according to the SVG spec. You also have namespaces, to deal with that a <title> might be a thing both in a text document and a song, and you may need to use both inside the same document without conflicting.
- dragonwriter 4y ago> Consider the case of embedding (composition is better than inheritance) data defined by a second schema inside a first schema. How, exactly, is JSON with JSON Schema inadequate for that?