diff options
Diffstat (limited to 'config_file/json_parser.py')
| -rw-r--r-- | config_file/json_parser.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/config_file/json_parser.py b/config_file/json_parser.py deleted file mode 100644 index 58924b4..0000000 --- a/config_file/json_parser.py +++ /dev/null @@ -1,19 +0,0 @@ -import json -from typing import Type - -from .base_parser import BaseParser - - -class JsonParser(BaseParser): - def __init__(self, file_contents: str): - super().__init__(file_contents) - - @property - def decode_error(self) -> Type[Exception]: - return json.decoder.JSONDecodeError - - def loads(self, contents: str) -> dict: - return json.loads(contents) - - def dumps(self, loaded_contents: dict) -> str: - return json.dumps(loaded_contents, indent=4) |