Download & Extend

Feeds JSONPath Parser

Features

This is a parser for the Feeds module that allows parsing JSON using JSONPath. It is very similar to the Feeds XPath Parser module.

Installation

The file jsonpath-0.8.1.php must be downloaded and put in the module folder. After installing the module, clear your cache so that the parser will be available in Feeds.

Documentation

Documentation can be found at http://goessner.net/articles/JsonPath/, and http://code.google.com/p/jsonpath/wiki/PHP.
** The syntax is different for the @ operator. In the documentation, examples look like @.name. That syntax changes to @['name'] since this is PHP and not Javascript.

Example

Starting with the JSON document:

{ "store": {
    "book": [
      { "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95
      },
      { "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99
      },
      { "category": "fiction",
        "author": "Herman Melville",
        "title": "Moby Dick",
        "isbn": "0-553-21311-3",
        "price": 8.99
      },
      { "category": "fiction",
        "author": "J. R. R. Tolkien",
        "title": "The Lord of the Rings",
        "isbn": "0-395-19395-8",
        "price": 22.99
      }
    ],
    "bicycle": {
      "color": "red",
      "price": 19.95
    }
  }
}

Assuming you have JSONPath expressions mapped to the Title, and Author fields, your expressions would look like:
Context: $.store.book.*

    Title: title
    Author: author

Downloads

Recommended releases

Version Downloads Date Links
7.x-1.0-beta2 tar.gz (10.72 KB) | zip (13.22 KB) 2011-Feb-05 Notes
6.x-1.0-beta5 tar.gz (10.7 KB) | zip (13.2 KB) 2011-Feb-05 Notes

Development releases

Version Downloads Date Links
7.x-1.x-dev tar.gz (12.36 KB) | zip (14.58 KB) 2012-Oct-06 Notes
6.x-1.x-dev tar.gz (10.66 KB) | zip (12.77 KB) 2011-Aug-15 Notes

Project Information


Maintainers for Feeds JSONPath Parser

  • twistor - 23 commits
    last: 32 weeks ago, first: 2 years ago

Issues for Feeds JSONPath Parser

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants
nobody click here