[wp-trac] [WordPress Trac] #14618: Proposal: Standardize WP Responses to JS Requests as JSON
WordPress Trac
wp-trac at lists.automattic.com
Fri Oct 22 16:30:05 UTC 2010
#14618: Proposal: Standardize WP Responses to JS Requests as JSON
-------------------------+--------------------------------------------------
Reporter: filosofo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: JavaScript | Version: 3.0
Severity: normal | Keywords: needs-patch
-------------------------+--------------------------------------------------
Changes (by josephscott):
* cc: josephscott (added)
Comment:
I followed the JSON-RPC development for awhile, one thing they never
addressed very well (to my knowledge) was binary data. This is also the
single biggest weakness in XML-RPC from my point of view. For *RPC style
APIs binary data ends up being base64 encoded, which is an added burden
that isn't really needed. Being able to do a direct HTTP POST with raw
binary data is both easier and more efficient.
Another, often less observed, weakness is no specific way to version the
API. Contrast this with an HTTP based API, which can include version
numbers as part of the URL string (just as an example: /json-api.php/wp-
delete-comment/1.0/).
I've yet to find a compelling reason to use an RPC style API instead of a
general HTTP one. I'm happy to be convinced other wise.
As for the general idea, this strikes me as something that would do well
as a core plugin, something that ships with WP and is even enabled by
default, but is developed and updated as a plugin. This allows for
advancements and bug fixes that aren't limited by the overall WP release
schedule.
Something you may want to take a look at as well is
http://wordpress.org/extend/plugins/json-api/ - sadly I haven't spent time
playing with this yet, but I think it is worth reviewing in conjunction
with this ticket.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14618#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list