diff --git a/ModuleFixTarget.py b/ModuleFixTarget.py index 3e706f5..edb9b49 100644 --- a/ModuleFixTarget.py +++ b/ModuleFixTarget.py @@ -47,21 +47,21 @@ class MyJsonEncoder(json.JSONEncoder): return repr(obj) return json.JSONEncoder.default(self, obj) - def iterencode(self, o, _one_shot=False): - list_lvl = 0 - l=super().iterencode(o, _one_shot=_one_shot) - #l=tuple(l);print(''.join(l)) # helpful to debug - for s in l: - if s.startswith('['): - list_lvl += 1 - if list_lvl > 0: - s = s[0]+s[1:].replace('\n', '').strip() - s = s.replace('\n', '').rstrip() - #self.item_separator): - #self.key_separator - if s.endswith(']'): - list_lvl -= 1 - yield s +# def iterencode(self, o, _one_shot=False): +# list_lvl = 0 +# l=super().iterencode(o, _one_shot=_one_shot) +# #l=tuple(l);print(''.join(l)) # helpful to debug +# for s in l: +# if s.startswith('['): +# list_lvl += 1 +# if list_lvl > 0: +# s = s[0]+s[1:].replace('\n', '').strip() +# s = s.replace('\n', '').rstrip() +# #self.item_separator): +# #self.key_separator +# if s.endswith(']'): +# list_lvl -= 1 +# yield s def MyJsonDecoder(dct): if isinstance(dct, dict):