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
Download https://github.com/FlowCommunications/JSONPath/archive/0.5.0.tar.gz and place the contents of JSONPath-0.5.0 in sites/all/libraries/jsonpath and enable the modules libraries and xautoload.
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
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - No further development
No longer developed by its maintainers. - Module categories: Import and Export, Developer Tools
- 1,715 sites report using this module
- Created by twistor on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
HOTFIX for installs without libraries on security fix.
Development version: 7.x-1.x-dev updated 7 Apr 2020 at 22:43 UTC