summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornchammas <nicholas.chammas@gmail.com>2014-04-18 15:03:23 -0400
committernchammas <nicholas.chammas@gmail.com>2014-04-18 15:03:23 -0400
commit36c32aa43ee777c2e05e69d796465e04822ffa0c (patch)
tree107c1c5216f68b6ad3c5300fc5f9e7844b7f2a62
parent87e2aee52ce673b6e9af80818258bc7226467af4 (diff)
downloadjsonpath-rw-36c32aa43ee777c2e05e69d796465e04822ffa0c.tar.gz
Fixed quick start example of expression building.
Added imports of `Fields()` and `Slice()` methods so that the final line of the quick start works. An alternate fix would be to prepend calls to those methods with `jsonpath.`.
-rw-r--r--README.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 106dcfb..2922f69 100644
--- a/README.rst
+++ b/README.rst
@@ -52,6 +52,9 @@ Then:
['number two', 'number one']
# You can also build expressions directly quite easily
+ >>> from jsonpath_rw.jsonpath import Fields
+ >>> from jsonpath_rw.jsonpath import Slice
+
>>> jsonpath_expr_direct = Fields('foo').child(Slice('*')).child(Fields('baz')) # This is equivalent
JSONPath Syntax