The “X” in JSON stands for Extensibility

While I do use JSON, I still think XML is superior for some important use cases (long-lived data that may be exchanged with other systems). So here’s a quick “rant” – prompted by Dan Brickley’s response to Bob DuCharme’s Reification is a red herring – aimed at those (younger?) folks “dissing” XML :)

Over time, requirements and technology inevitably change. Extensibility (the “X” in XML) is the property that helps us adapt and keep pace, letting us evolve technology from simple to advanced without having to throw away and reimplement existing functionality. Here’s two reasons why XML is better at it than JSON:

From one to many

Cardinality (whether data has one or multiple values) is a common problem in data modeling: In a relational database, you need to change the schema (creating an additional table) to turn a single-valued into a multi-valued field. Programming languages distinguish between scalar values and arrays or collections.

Not so in XML; I can move effortlessly (on the producer side, at least) from single…

Read the full article…

Thu, 31 May 2018 12:22:00 +0000