JSON now became a cheap and easy way to escape the (perceived) complexities of XML. For most, extensibility, namespaces and validation are just annoyances. Or maybe too many developers disliked the syntax of XML, so they moved to the JavaScript-like JSON. But what if you really, really wanted to validate JSON objects against a schema?
Well, there’s JSON-schema, of course. While not actively developed anymore (its IETF draft expired in mid–2011), it was defined under the same philosophy as JSON itself, meaning small and simple. And while there are no formal tools to test the validators themselves, a good list of free tools implement it at least partly.
Interestingly, to be able to define references in schema definitions, they also defined “links” to refer to a JSON element, akin to XML’s XPath. It’s still missing namespaces, but, hey, good enough.
Published on November 5, 2012 at 20:53 EST
Older post: The Polite Computer
Newer post: Election Night in the USA