diff options
Diffstat (limited to 'libs/json_tools.py')
-rw-r--r-- | libs/json_tools.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/json_tools.py b/libs/json_tools.py index 9ce19b0..5e78d23 100644 --- a/libs/json_tools.py +++ b/libs/json_tools.py @@ -1,9 +1,9 @@ -import json
-
-
-class JsonSerializable(object):
- def __repr__(self):
- return str(self.to_json())
-
- def to_json(self):
- return json.dumps(self.__dict__, ensure_ascii=False)
+import json + + +class JsonSerializable(object): + def __repr__(self): + return str(self.to_json()) + + def to_json(self): + return json.dumps(self.__dict__, ensure_ascii=False) |