Applied tgc's patch

This commit is contained in:
Philip Ridout 2017-09-07 21:27:11 +01:00
parent 28591ed04a
commit 07ba52e90c
1 changed files with 5 additions and 2 deletions

View File

@ -40,7 +40,8 @@ class OpenLPJsonDecoder(JSONDecoder):
self.kwargs = kwargs
if object_hook is None:
object_hook = self.custom_object_hook
super().__init__(object_hook, parse_float, parse_int, parse_constant, strict, object_pairs_hook)
super().__init__(object_hook=object_hook, parse_float=parse_float, parse_int=parse_int,
parse_constant=parse_constant, strict=strict, object_pairs_hook=object_pairs_hook)
def custom_object_hook(self, obj):
"""
@ -71,7 +72,9 @@ class OpenLPJsonEncoder(JSONEncoder):
self.kwargs = kwargs
if default is None:
default = self.custom_default
super().__init__(skipkeys, ensure_ascii, check_circular, allow_nan, sort_keys, indent, separators, default)
super().__init__(skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular,
allow_nan=allow_nan, sort_keys=sort_keys, indent=indent, separators=separators,
default=default)
def custom_default(self, obj):
"""