aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-02-09 13:54:49 -0600
committerEugene Triguba <eugenetriguba@gmail.com>2020-02-09 13:54:49 -0600
commit17de516057ba0812af1ba256f413d0dc5a258e7e (patch)
treea3de3cd32eb0403b05c8f9f92c20721503393453
parentAllow a default value for the get() method (diff)
parentFix build and codecov badge (diff)
downloadconfig-file-17de516057ba0812af1ba256f413d0dc5a258e7e.zip
Merge branch 'master' of github.com:eugenetriguba/config_file
-rw-r--r--README.rst8
-rw-r--r--config_file/parsers/json_parser.py14
2 files changed, 7 insertions, 15 deletions
diff --git a/README.rst b/README.rst
index 525e95e..1373662 100644
--- a/README.rst
+++ b/README.rst
@@ -28,7 +28,7 @@ Installation
:target: https://pypi.org/project/black/
.. |Documentation Status| image:: https://readthedocs.org/projects/config-file/badge/?version=latest
:target: https://config-file.readthedocs.io/en/latest/?badge=latest
-.. |Build Status| image:: https://travis-ci.com/eugenetriguba/config_file.svg?branch=master
- :target: https://travis-ci.com/eugenetriguba/config_file
-.. |Codecov| image:: https://codecov.io/gh/eugenetriguba/config_file/graph/badge.svg
- :target: https://codecov.io/gh/eugenetriguba/config_file \ No newline at end of file
+.. |Build Status| image:: https://travis-ci.com/eugenetriguba/config-file.svg?branch=master
+ :target: https://travis-ci.com/eugenetriguba/config-file
+.. |Codecov| image:: https://codecov.io/gh/eugenetriguba/config-file/graph/badge.svg
+ :target: https://codecov.io/gh/eugenetriguba/config-file
diff --git a/config_file/parsers/json_parser.py b/config_file/parsers/json_parser.py
index 9b8e93c..9e9f52d 100644
--- a/config_file/parsers/json_parser.py
+++ b/config_file/parsers/json_parser.py
@@ -16,17 +16,9 @@ class JsonParser(BaseParser):
"""
The JsonParser allows use of json files with ConfigFile. The syntax it
supports is a bit more flexible than the IniParser.
-
- Since you can have deeply nested structures with JSON, the JsonParser supports
- a catch all where you can get/set/delete all occurrences of a particular
- key. This is the default behavior if you only specify a single word key.
-
- If there is a '.' in the key, it is assumed you want to use the dot syntax
- then.
-
- If no '.' is in the key parameter and we have specified we're only
- trying to fetch a top level item with 'top_level_only=True', the parser
- only retrieve the key in the top most level.
+
+ By default, the dot syntax is used. However, if you'd like to get/set/delete all
+ of a particular key, you can specify so with an optional parameter.
Example: