[wp-trac] [WordPress Trac] #25639: Implement a JSON feed using rssjs.org spec

WordPress Trac noreply at wordpress.org
Wed Nov 20 14:59:33 UTC 2013


#25639: Implement a JSON feed using rssjs.org spec
------------------------------------+-----------------------
 Reporter:  nacin                   |       Owner:  pento
     Type:  feature request         |      Status:  assigned
 Priority:  normal                  |   Milestone:  3.8
Component:  Feeds                   |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+-----------------------

Comment (by mbijon):

 While AS1 and RSS.JS are fairly new, I think the lack of implementations
 may indicate some of the structural issues noted above are problematic.
 I'm not sure if the best option for solving these is extending or creating
 an alternative, but I have experience implementing JSON (actually JSON-P)
 data-sharing in several past work projects.

 Also, if we did have a supported JSON/JSON-P format, content-sharing from
 WP to other CMSes would be more common. Our current RSS formats make it
 tough. I've seen several implementations try to do content-sharing using
 RSS and it's usually fragile, contentious code. With IT disliking the need
 to make changes to code like that, it may be enforcing "lock in" to build
 blogs into pay/enterprise CMSes.


 When doing content-sharing from WP to another main or marketing site, my
 preferred method is a quick, custom view via @dphiffer's excellent JSON
 API plugin. The one downside though is that plugin is designed almost like
 an MVC framework and requires some controller and view setup every time.
 Having our own feed format would speed up getting the data and further
 prevent fragility. What that format is I'm not sure yet, but I think it
 needs to be (a) either a significant extension of AS1 or completion of the
 WP API, and (b) support JSON-P for frontend-only (JS) cross-domain access.

 ----

 '''Use Cases'''

 The most-common use of a JSON feed seems to be displaying corporate blog
 content in a main or marketing site's sidebar. This might look something
 like our widgets on the front end and be in a sidebar area. My preferred
 method after building many of these is to stay frontend-only & pull the
 data via JSON-P. This avoids any duplicate storage of content that might
 happen if you use the other CMS's backend tools, spares learning a 2nd CMS
 paradigm (and negotiating with someone in IT about new tables vs existing
 tables), and fits the Backbone model of frontend views.


 Another use case for exposing all post, category, and meta data via JSON
 is for Backbone-based themes. I considered one of these a while back as a
 learning experiment, but put it aside when I realized it would need the
 JSON API plugin and not be very portable. Devin and Zack discussed the
 same thing on Twitter just yesterday too,
 https://twitter.com/devinsays/status/402570447742459904. Their resolution
 was the JSON API plugin. If we had our own JSON format it would save them
 a lot of time and (IMO) make Backbone-based themes tenable.

 ----

 TL;DR
 Both RSS.JS & AS1 currently fall short of our needs, but there is a
 definite demand for JSON & JSON-P feeds -- for cross-site content widgets
 and Backbone-based themes. A core or 'official' format would reduce the
 extra work of using a JSON API plugin and help push adoption.

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


More information about the wp-trac mailing list