[wp-hackers] GSoC Proposal: JSON REST API

Ryan McCue lists at rotorised.com
Wed Apr 10 09:35:16 UTC 2013


Filippo Pisano wrote:
> Hi Ryan,
>
> as far as I know ther plugin JSON API (
> http://wordpress.org/extend/plugins/json-api/) do most of the work you
> mentioned. I used it once and it seemed very robust to me.
> Maybe this could be a good start to implement the API natively into WP.
>
Hey Filippo,

I've actually investigated the previous solutions somewhat, and they 
have several problems:

 1. They aren't designed for core integration, and are intended to
    always live as plugins. This is a problem for something that should
    be in core.
 2. They aren't very robust for custom post types. Most of the existing
    ones are tailored to posts and pages, not the generic system of CPTs
    and taxonomies that WP has
 3. They aren't very REST-ful. A lot of the existing ones are basically
    JSON-RPC, which I've argued against before, since it's mixing things
    unnecessarily (IMO)
 4. They aren't very WordPress-y. WordPress has a bunch of (often
    strange) ways of doing things which most core developers are
    familiar with, and these plugins usually eschew those.

With the plugin you linked, it's vulnerable to 1, 2, and 4. It's very 
plugin-oriented (IMO), CPTs are an afterthought (mainly due to the age 
of the plugin) and it doesn't seem to follow WP paradigms (it has 
controllers/models, which most of WP doesn't).

If the project is accepted, I'll definitely take existing work into 
consideration, but most of it isn't that great. The best inspiration so 
far has been WP.com's API endpoints.

Thanks,

-- 
Ryan McCue
<http://ryanmccue.info/>



More information about the wp-hackers mailing list