Hacker News new | past | comments | ask | show | jobs | submit login

The fact that JSON is just a format standard and doesn't have specified components (like links etc) but instead we have to built those on top has cost us a lot in APIs. Btw, according to RFC 8288 Web Linking (and before that 5988), a link consists of 3 parts + 1 optional part:

"In this specification, a link is a typed connection between two resources and is comprised of:

   o  a link context,
   o  a link relation type (Section 2.1),
   o  a link target, and
   o  optionally, target attributes (Section 2.2).

   A link can be viewed as a statement of the form "link context has a
   link relation type resource at link target, which has target
   attributes".

   For example, "https://www.example.com/" has a "canonical" resource at
   "https://example.com", which has a "type" of "text/html".
"

That's why you need a standardized link component that is globally accepted/understood that takes into account all parts of the linking, instead of having various ways depending on the API/JSON-based Media Type to communicate that something is a link.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: