4 ms·
Absolutely not. XML has its roots in document creation for large organizations, and has a structure appropriate for that -- mostly an ordered graph of text nod
by neilk 17y ago
Absolutely not.
XML has its roots in document creation for large organizations, and has a structure appropriate for that -- mostly an ordered graph of text nodes, which do not need to be declared (and indeed are not consistent between parsers), with provision for special node types with their own contents. But early in its history XML got hijacked by a lot of comp-sci theorists who wanted to create highly abstract notions of messaging, separating message validity and provenance from application logic. This gave the world things like XML Schemas and SOAP and worse.
Meanwhile, JSON is a straight representation of common scripting language data structures. Arrays, dictionaries. Simple. Node boundaries are syntactically explicit. In this philosophy is taken for granted that message validity will be ascertained at the application level. There are no fantasies of doing so at the document parsing level.