[wp-trac] [WordPress Trac] #23099: Add JSON-RPC support using existing XML-RPC methods

WordPress Trac noreply at wordpress.org
Sun Feb 3 19:52:09 UTC 2013


#23099: Add JSON-RPC support using existing XML-RPC methods
------------------------------------------+------------------
 Reporter:  maxcutler                     |       Owner:
     Type:  feature request               |      Status:  new
 Priority:  normal                        |   Milestone:  3.6
Component:  XML-RPC                       |     Version:  3.5
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |
------------------------------------------+------------------

Comment (by maxcutler):

 Replying to [comment:33 redsweater]:
 > My general impression of the JSON-RPC wrapper proposal on the server is
 that it's an example of "junking up" the code base for a short-term gain.
 I think that's the gist of the reaction you are getting from markoheijnen
 and rmccue as well. The onus is on proponents to argue that the benefits
 of this patch are so great that they override the stop-gap, junking-up
 impression it leaves on some of us.

 Let's put some perspective on this: the supplied patch is only about 110
 lines of code if you ignore the change in method declarations (re:
 scribu/nacin comment above). It also adds the ability for plugins to add
 whatever serialization format they might prefer: YAML, MessagePack, jsonp,
 plist, custom XML schemas, etc, etc.

 To call that "junking up the code base" is a bit hyperbolic considering
 the state of the WordPress code base...

 As someone who writes and maintains a WordPress XML-RPC client, you are
 probably familiar with the pains of properly implementing said APIs. If
 you'd like, I can pull up a list of several dozen bugs in the official WP
 mobile apps from just the last six months that have been caused by
 poor/buggy XML-RPC implementations.

 The fact of the matter is that JSON is much easier to work with than XML
 for almost all modern development environments, from mobile to desktop to
 web. I've written WP XML-RPC clients for multiple languages, and it's a
 pain everywhere.

 There are also many scenarios where it would be easier for WP plugins to
 use a JSON-RPC endpoint than to muck around with the current AJAX hooks.
 See #14618 for more discussion.

 I agree with everyone that a "proper" RESTful API would be ideal, but the
 reality of the situation is that it's going to take a long time for it to
 land in core. In the intervening year+ of time, it would be so nice to
 make the lives of the mobile and plugin devs better by having a JSON-RPC
 API in core that can be depended on for talking to all WP.org sites.

 That's just my 2 cents. My goal is simply to broaden WordPress' reach by
 making it easier to integrate with other systems, and in my experience
 XML-RPC is a really big negative point for outside developers considering
 such integrations. I understand that the core community's perspective and
 priorities may be different, but I want this to be a realistic and not an
 idealistic discussion.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23099#comment:34>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list