[wp-hackers] GSoC Proposal: JSON REST API
mike at newclarity.net
Fri Apr 12 04:09:36 UTC 2013
On Apr 11, 2013, at 11:47 PM, Ryan McCue <lists at rotorised.com> wrote:
> "application/wordpress+json" would be nice, but requires an IANA
> registration, which likely means going via an RFC. Given that the format
> is for WP interoperability (for the foreseeable future, at least), the
> type would either be "application/vnd.wordpress.api+json" or simply
> "application/json" for maximum compatibility.
You are indeed correct, and "application/vnd.wordpress.api+json" would be more appropriate without an IANA registration.
In my discussion I was focused on the benefits of a WordPress-specific content type vs. generic JSON so was careless in the actual media type fact. The key point was that the establishment and usage of a WordPress-specific media type would have great value no matter what the actual characters were that were contained within the content type string.
> I'm a huge fan of mnot's posts (especially given that he's an authority
> on REST), and I've looked at this post a fair bit. For this project, all
> factors involved would need to be considered, so I have not yet made a
> decision on this.
Do you think this is a project that is insignificant enough that a single decider would be wise? It would seem given the significance a JSON API would have on the platform of WordPress that a consensus of views would be a wise path?
> (Also note that "wp-json" isn't a great relation here; non-registered
> relations should be URLs. Likely, it'll be rel="alternate" with
> type="..." as per above.)
Again, you are correct and I again was focused on the need not the specifics.
This is likely the appropriate markup:
<link rel="alternate" type="application/vnd.wordpress.api+json" href="http://example.com/wp-json.php">
> Thanks! One plus of this project seems to be that quite a few people
> want to mentor it, so we'll just have to see how it works out.
Yes, this is an area that's beyond end-user feature and is something that if done poorly or short-sightedly could result in a large opportunity lost but if done well could further expand what the WordPress platform is capable of, maybe even by an order of magnitude.
As such, it's no wonder many people are interested.
More information about the wp-hackers