3 ms·
XML is only semi-structured/typed without schema. JSON and Mark are always typed. Full formal schema definition, as in XML, is often a burden to ad-hoc scripti
by henryluo 9y ago
XML is only semi-structured/typed without schema. JSON and Mark are always typed.
Full formal schema definition, as in XML, is often a burden to ad-hoc scripting, which is common in JS. JSON/Mark provides sufficient type info for these adhoc usages.
- cakoose 9y agoJSON is not "fully typed". It just happens to have different syntax for strings, numbers, and booleans. But the application code still needs to come up with a way to distinguish between timestamps, enums, different object types, etc. XML uses the same syntax for strings, integers, and booleans, but it has mature schema/typing tools that make it easy to apply more precise typing, which you'd want to do anyway to identify timestamps, enums, and different object types.