summaryrefslogtreecommitdiffstatshomepage
path: root/includes/js/dojox/jsonPath/README
diff options
context:
space:
mode:
authorGravatar mensonge2008-11-14 15:39:19 +0000
committerGravatar mensonge2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/jsonPath/README
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
scuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.zip
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/jsonPath/README')
-rw-r--r--includes/js/dojox/jsonPath/README125
1 files changed, 0 insertions, 125 deletions
diff --git a/includes/js/dojox/jsonPath/README b/includes/js/dojox/jsonPath/README
deleted file mode 100644
index 2da2b31..0000000
--- a/includes/js/dojox/jsonPath/README
+++ /dev/null
@@ -1,125 +0,0 @@
--------------------------------------------------------------------------------
-dojox.jsonPath
--------------------------------------------------------------------------------
-Version 1.0
-Release date: 11/14/2007
--------------------------------------------------------------------------------
-Project state: beta
--------------------------------------------------------------------------------
-Project authors
- Dustin Machi
- Kris Zyp
--------------------------------------------------------------------------------
-Project description
-
-jsonPath is a query system similar in idea to xpath, but for use against
-javascript objects. This code is a port of the jsonPath code at
-http://code.google.com/p/jsonpath/. It was contributed under CLA by Stefan
-Goessner. Thanks Stefan!
--------------------------------------------------------------------------------
-Dependencies:
-
-Dojo Core (package loader).
--------------------------------------------------------------------------------
-Documentation
-
-Usage:
-
-var matches = dojox.jsonPath.query(objectToQuery, jsonPathExpresson)
-
-Expressions:
-
- $ The Root Object
- @ The current object/element
- . or [] The child operator
- .. Recursive descent
- * all objects
- [] subscript operator
- [,] Union operator
- [start:end:step] array slice operator
- ?() applies a filter/script expression
- () script expresions
-
- some examples:
-
- Given the following test data set:
-
- var json =
- { "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
- }
- }
- };
-
- Here are some example queries and their output:
-
- $.store.book[*].author
- ["Nigel Rees","Evelyn Waugh","Herman Melville","J. R. R. Tolkien"]
-
- $..author
- ["Nigel Rees","Evelyn Waugh","Herman Melville","J. R. R. Tolkien"]
-
- $.store.*
- [[{"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}],{"color":"red","price":19.95}]
-
- $.store..price
- [8.95,12.99,8.99,22.99,19.95]
-
- $..book[(@.length-1)]
- [{"category":"fiction","author":"J. R. R. Tolkien","title":"The Lord of the Rings","isbn":"0-395-19395-8","price":22.99}]
-
- $..book[-1]
- [{"category":"fiction","author":"J. R. R. Tolkien","title":"The Lord of the Rings","isbn":"0-395-19395-8","price":22.99}]
-
- $..book[0,1]
- [{"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}]
-
- $..book[:2]
- [{"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}]
-
- $..book[?(@.isbn)]
- [{"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}]
-
- $..book[?(@.price<10)]
- [{"category":"reference","author":"Nigel Rees","title":"Sayings of the Century","price":8.95},{"category":"fiction","author":"Herman Melville","title":"Moby Dick","isbn":"0-553-21311-3","price":8.99}]
-
- $..*
- [{"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}},[{"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}],{"color":"red","price":19.95},{"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},"reference","Nigel Rees","Sayings of the Century",8.95,"fiction","Evelyn Waugh","Sword of Honour",12.99,"fiction","Herman Melville","Moby Dick","0-553-21311-3",8.99,"fiction","J. R. R. Tolkien","The Lord of the Rings","0-395-19395-8",22.99,"red",19.95]
-
-
--------------------------------------------------------------------------------
-Installation instructions
-
-Grab the following from the Dojo SVN Repository:
-http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/jsonPath
-
-Install into the following directory structure:
-/dojox/jsonPath/
-
-...which should be at the same level as your Dojo checkout.