(json_string)
| 23 | json5.dump(json_dict, fp, ensure_ascii=False, indent=indent) |
| 24 | |
| 25 | def check_json(json_string): |
| 26 | try: |
| 27 | json5.loads(json_string) |
| 28 | return True |
| 29 | except json.JSONDecodeError: |
| 30 | return False |
| 31 | |
| 32 | def refine_json(json_string): |
| 33 | json_string = json_string.strip().replace('\r', '').replace('\t', '').replace('\n', '').replace('\\', '') |