Closed anthumchris closed 2 years ago
In XML you can use the element name to represent types, wheras with JSON you would need to manually add a type field and do a lot of extra work to map that onto your types. With XML you can just use an off-the-shelf parser and get sensible stuff out of it. I actually tried doing it with JSON first and don't regret switching.
they main actual issue was polymorphism, that's when you really need the type name, in other cases you can sort of imply the type from the context.
I'm curious to know why XML was chosen as the portable data format instead of using other interoperable formats like JSON or YAML. Does XML provide benefits to developers, specific platforms, or programming languages that JSON/YAML would not?