MCPcopy
hub / github.com/RUB-NDS/PRET / clean_json

Method clean_json

postscript.py:1021–1025  ·  view source on GitHub ↗
(self, string)

Source from the content-addressed store, hash-verified

1019
1020 # bad practice
1021 def clean_json(self, string):
1022 string = re.sub(",[ \t\r\n]+}", "}", string)
1023 string = re.sub(",[ \t\r\n]+\]", "]", string)
1024 return string
1025 # return str(string, errors='ignore')
1026
1027 # ------------------------[ resource <category> [dump] ]--------------
1028 def do_resource(self, arg):

Callers 1

dictdumpMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected