forked from openlp/openlp
Applied tgc's patch
This commit is contained in:
parent
28591ed04a
commit
07ba52e90c
@ -40,7 +40,8 @@ class OpenLPJsonDecoder(JSONDecoder):
|
|||||||
self.kwargs = kwargs
|
self.kwargs = kwargs
|
||||||
if object_hook is None:
|
if object_hook is None:
|
||||||
object_hook = self.custom_object_hook
|
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):
|
def custom_object_hook(self, obj):
|
||||||
"""
|
"""
|
||||||
@ -71,7 +72,9 @@ class OpenLPJsonEncoder(JSONEncoder):
|
|||||||
self.kwargs = kwargs
|
self.kwargs = kwargs
|
||||||
if default is None:
|
if default is None:
|
||||||
default = self.custom_default
|
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):
|
def custom_default(self, obj):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user