Hacker News new | past | comments | ask | show | jobs | submit login
JSON API – A Specification for Building APIs in JSON (jsonapi.org)
26 points by lobo_tuerto on Aug 19, 2016 | hide | past | favorite | 9 comments



This is a hypermedia-optional, not-quite-RPC, not-quite-REST style spec that actually corresponds rather well with the kinds of JSON-on-the-wire, HTTP-as-a-protocol APIs that people in the 2010s tend to cook up. Their FAQ backs this up by saying: "(...) JSON API is an attempt to formalize similar ad hoc client-server interfaces that use JSON as an interchange format."

Because this style of HTTP API is very common, this spec is more useful than it may seem. It's no secret that most "RESTful" APIs are not REST because hypermedia is an afterthought or missing completely. Specs like HAL and JSON-LD are intense in the sense that the problem domain requires careful ponderation, so most people don't go that route and never reach level 3 of the Richardson Model [1]. XML has fallen out of favor, JSON has schemas now (wow), RPC hasn't become fashionably mainstream again (although specs like gRPC, protobuf, Thrift have been trying). Code generators and WSDL-reimaginings like Swagger and RAML make it easy to spew JSON across the wire, so this spec forms a useful baseline, for sanity's sake.

[1] http://martinfowler.com/articles/richardsonMaturityModel.htm...


Previously posted numerous times:

https://news.ycombinator.com/item?id=5653706 (135 comments)

https://news.ycombinator.com/item?id=9280058 (107 comments)


In fact, one of those posts were by the submitter of this post. On the surface, this looks like a way to game the system of collecting points by posting things that are bound to be voted up a lot.


A quick scan of history shows the same thing (for example, I saw jwt.io submitted more than once, so I suspect this is a strategy)


Or just resubmitting stuff that was deemed useful back then, and see if it still is, reach new users.

I really like when someone reposts something that was popular a while back but I just missed it completely.


To me this looks a lot like XHTML/XML serialized into JSON. I just don't see the benefits.


Oh boy, please don't ever build an API like this.


There's trend with a lot of "standards" right now to pretend they are somehow anti-bikesheding (like standardJS does) when in fact they are yet another cause of bikesheding.

It's an arrogant, and quite silly, thing to sell as a "feature". What it tells me is there is likely a ton of not very well thought through choices that are polarizing and have no real justification other than the author(s) thought it was a good idea at the time.

In fact I find it's often a sign I should avoid whatever system it is (and I've generally been proven correct, long term).


An Application Programming Interface?

Isn't that sort of like Calling Procedures Remotely?




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

Search: