Does anyone know of any modules out there that would allow creation of a view with source data being JSON or XML retrieved from a web service? I have a situation with a "central" drupal site, and then multiple client drupal sites that want to get data from the central site. I can return the data from the central site as JSON via the Services module combined with the Views Datasource and REST Server modules, but then I lose the ability to leverage the power of views (like automatic pagination for instance).
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 2012-06-13 22.51.23.png | 23.69 KB | yarco |
| #14 | 2012-06-13 22.52.11.png | 27.85 KB | yarco |
| #14 | 2012-06-13 22.52.35.png | 90.13 KB | yarco |
Comments
Comment #1
srebelo commentedHello!
There is a module that exports views in several types, including XML - http://drupal.org/project/views_data_export
I hope it helps!
Comment #2
brettbirschbach commentedThanks srebelo, but in this case I'm looking for the exact opposite. I want to create a view that can *consume* JSON/XML instead of produce it.
Comment #3
dawehnerIn general you can only use pluggable query backends in views3 and above.
There is one for xml: http://drupal.org/project/xml_views
But there is none for json.
Comment #4
brettbirschbach commentedThank you for the reply. I'll have to take a look.
Comment #6
andrewfn commentedI would be very interested in such a feature--it seems to be the missing part of the picture. You suggest this is possible in Views 3? This looks similar to this issue for the Web service client module: #1215570: Views Integration for 'Web service client' module
Comment #7
dawehnerWell the views module provides you a sane api to provide such an integration, but this will probably not land in views itself, because it's kind of an api module.
@see above with xml_views.
Comment #8
adrien.felipe commentedI would say you can also use feeds to import nodes from the json or xml and then display them with a view
Comment #9
dawehnerThere was even a google summer of code project to use a views-query-backend to import data via feeds :)
Comment #10
nw commentedSo as far as I can tell, the current state of art is:
* Views 3 has a pluggable query back end:
* GSoC proposal for "Views Query Backends" at http://groups.drupal.org/node/57168 but no evidence there of the project having started up
* YQL Views Query (http://drupal.org/project/yql_views_query). A GSoC 2010 project which stagnated over a year ago. Drupal 7/ Views 3.
* XML Views (http://drupal.org/project/xml_views). Stagnated about a year ago. Drupal 6/Views 3
* WS Client (http://drupal.org/project/wsclient) is a nice D7 module, which wraps around external SOAP & REST services. It could act as a data provider for Views 3, but I've seen no evidence of an implementation.
Comment #11
martinbutt commentedHi,
I have set up a group for discussing how we could bring this to life. Your input is appreciated.
http://groups.drupal.org/views-web-service-input
Cheers,
Martin
Comment #12
dropchew commentedThis should do it.
http://drupal.org/project/views_xml_backend
Does anyone know if there's a similar module or in the works for json...?
Comment #13
clevername commentedI'm sponsoring a project for plugging in JSON Web Services into the Views backend. If anyone is interested, here's the link: http://www.freelancer.com/projects/PHP-AJAX/Drupal-JSON-Views-Module.html
I'll post an update here once the project evolves.
Comment #14
yarco commentedOh, my friend. I comes from freelancer (or from drupal long time ago).
I did a half done work. See the image:



Json Data:
Configure Field:
View:
You could see currently it doest support filter etc. Only a very basic version......
Comment #15
clevername commentedGreat, here's the link to the sandbox page if you want to upload to git: http://drupal.org/sandbox/clevername/1630546
Comment #16
JayShoe commentedThere is a similar project which uses "web service client" and a sandbox called "web service client views". You can see the details here.
Web Service Client Views
Comment #17
pasqualleanother sandbox for json backend https://drupal.org/sandbox/marcofernandes/2096685
Comment #18
discipolo commentedhttps://www.drupal.org/project/views_json_query