0.1.0releasedDynamic JSON Datasource

Use JSON as a dynamic datasource

Clone URLhttps://github.com/qurben/dynamic_json.git

Add as a submodulegit submodule add https://github.com/qurben/dynamic_json.git extensions/dynamic_json --recursive

Compatibility

2.x.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.x2.7.0
NoNoNoNoNoNoNoNo. Soon?

Readme

Dynamic JSON Datasource

  • Version: 0.1.2
  • Author: Gerben Oolbekkink
  • Release date: 06-24-13
  • Requirements: Symphony 2.3.2

Description

With more and more API's switching to pure JSON —think of Twitter, Rottentomatoes, etc— sometimes there is no option but to use a JSON API. This extension allows you to create a JSON-based datasource just like an XML-based datasource; the JSON is converted to XML in the backend and provided to the frontend as pure XML.

Installation

  1. Place the dynamic_json folder in your Symphony extensions directory.
  2. Go to System > Extensions, select "Dynamic JSON Datasource", choose "Enable" from the with-selected menu, then click Apply.

Usage

  1. Go to Blueprints > Data sources and click Create new
  2. Choose a name for your data source
  3. From Source select under From extensions Dynamic JSON
  4. Provide a URL to a valid JSON page
  5. Use an xpath expression to select only a certain piece of the document
  6. Click Create Data Source
  7. Treat your newly created data source as any other Dynamic XML data source

Hints

To see the XML generated from this data source just add it to a page and use the Debug Devkit (?debug) to inspect the XML.

Roadmap

I am looking at implementing some kind of OAuth implementation to properly include Twitter on a website. See qurben/[email protected]

Notes

This extension is still in development, so use it at your own risk. It should work just as stable as Dynamic XML. Be aware of the fact that the XML structure may change after updating to a next version; it is now just made to work, tidying up is next.

Changes

0.1.2: Generated JSON is much cleaner, the default class provided in Symphony creates a lot of junk

Version history

Requires Symphony 2.3.2