To get REST right, you need HATEOAS (Hypermedia as the Engine of Application State). And to get HATEOAS right, you need hypermedia-rich data formats that support flexible media types. Problem is, we didn’t really have any such data format.
Until now, that is, with the JSON-LD, a JSON-based Serialization for Linked Data, which became a W3C recommendation on January 16th of this year. Now we can build fully interoperable RESTful APIs without worrying about such issues as changing data formats or semantic conflicts, because we can resolve any such incompatibilities with HATEOAS.
Yeah, right. Only in our dreams, it seems. Turns out one of the primary creators of JSON-LD, Manu Sporny, has a decidedly mixed opinion of the recommendation, as well as the process for creating one, as he explains in his refreshingly candid blog post.
The disclaimer at the top of this post is the best disclaimer I’ve ever seen, and the rest doesn’t disappoint. But in all seriousness, this post illustrates the politics and compromises that go into any standards effort – in particular, interoperability standards that codify the metadata that lead to loose coupling of interfaces. They all involve politics and compromises, which means they all suck.
And not only that, they will always continue to suck into the future. We’re chasing the pot of gold under some RESTful rainbow somewhere. The only way we’ll ever come up with some kind of final standard is for everyone involved to have the same perspective and agree on everything, and that’s entirely counter to human nature. There’s simply no hope that someday the “perfect” interoperability standard will finally come along and resolve all interoperability issues.
The API Economy is winding down, folks. It’s time for a different approach.
JSON, REST API