Task description
Write a json query backend for views.
This would allow to build views and query in a json. This json could have any kind of content in it.
Nowadays many websites provides some informations about it as json.
Technical implementation
Write a module which has the following hooks:
hook_views_api: register the module to views
hook_views_plugins: register the query plugin to views.
hook_views_data: register the data structure to views.
There are quite some different json query languages which could be used for this module.
The student has to find out which one fit's the need here.
It's recommended to look at the xml_views, yql or twitter_views module which are both quite light-weight examples.
Especially the xml_views query backend shows how to deal with a very general output as json.
Both gsoc students c&p the existing module and started from it.
The json data would contain
* fields
There you can select which field/attribute of a json node you want to get back.
* filters
The user could either input some json query directly or use a setting which allows to filter-by-attribute or filter-by-value.
Deliverables
A module on drupal.org.
Resources
- General views api: Advanced help of views.
- IRC channels: #drupal-views #drupal-contribute
- Examples of existing views query backends
- http://drupal.org/project/apachesolr_views
- http://drupal.org/project/yql_views_query
- http://drupal.org/project/sparql_views
- http://drupal.org/project/wbapi
- http://drupal.org/project/twitter_views
- http://drupal.org/project/xml_views
many more ... :)
Primary Contact
dereine
Comments
Comment #1
pasqualleThere are some json backend modules in development, see: #1222942: Views Data Input (JSON, XML, etc)