summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenn Knowles <kenn@kennknowles.com>2016-12-17 15:32:49 -0800
committerGitHub <noreply@github.com>2016-12-17 15:32:49 -0800
commit45b4382f74b0dd35b2866941dc6aa89642868e64 (patch)
treea62405f66b7acf8ce32d11fdf8cdaf5a0ca92a20
parent3a194faf81e79f44997f28d76c554b3ca7bd3b64 (diff)
parent82a7776235656cdb442e711591034a52c964bbe3 (diff)
downloadjsonpath-rw-45b4382f74b0dd35b2866941dc6aa89642868e64.tar.gz
Merge pull request #45 from Evgenus/patch-1
Add basics of how to load JSON in Python to README.rst.
-rw-r--r--README.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 144a82a..a6ef686 100644
--- a/README.rst
+++ b/README.rst
@@ -177,6 +177,19 @@ The original proposal, as far as I know:
- `JSONPath - XPath for
JSON <http://goessner.net/articles/JSONPath/>`__ by Stefan Goessner.
+Other examples
+--------------
+
+Loading json data from file
+
+.. code:: python
+
+ import json
+ d = json.loads('{"foo": [{"baz": 1}, {"baz": 2}]}')
+ # or
+ with open('myfile.json') as f:
+ d = json.load(f)
+
Special note about PLY and docstrings
-------------------------------------