Skip to content

Commit 45b4382

Browse files
authored
Merge pull request #45 from Evgenus/patch-1
Add basics of how to load JSON in Python to README.rst.
2 parents 3a194fa + 82a7776 commit 45b4382

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,19 @@ The original proposal, as far as I know:
177177
- `JSONPath - XPath for
178178
JSON <http://goessner.net/articles/JSONPath/>`__ by Stefan Goessner.
179179

180+
Other examples
181+
--------------
182+
183+
Loading json data from file
184+
185+
.. code:: python
186+
187+
import json
188+
d = json.loads('{"foo": [{"baz": 1}, {"baz": 2}]}')
189+
# or
190+
with open('myfile.json') as f:
191+
d = json.load(f)
192+
180193
Special note about PLY and docstrings
181194
-------------------------------------
182195

0 commit comments

Comments
 (0)