[Links] JSON Hypermedia Types
When designing a REST API, every developer faces this issue: what JSON format to use for the API. Let’s see the current options.
- HAL - Hypertext Application Language
- Collection+JSON - Hypermedia Type
- JSON API
- UBER - Uniform Basis for Exchanging Representations
- Mason - A hypermedia enabled JSON format
- YAHAPI - Yet Another Hypermedia(ish) API specification
- JSON-LD - JSON for Linking Data
- CPHL - Cross-Platform Hypertext Language
- OData - the best way to REST
One could wonder why there a so many “standards” and why so few APIs use them in production. I personally believe that if a standard were really needed, it would have emerged.
Hypermedia and the HATEOS constraint are great, and you should use them in your APIs. However, trying to reuse one of these so-called “standard” is a waste of time. They all push you to include useless information and increase the overhead. At the end of the day, is this really beneficial for the end-user? I don’t think so.
Be pragmatic! Design your API as you think is best, and think about your clients first, the rest of bullshit.