Validieren Sie die JSON -Datei programmatisch in Python

import json

def parse(filename):
    try:
        with open(filename) as f:
    	return json.load(f)
    except ValueError as e:
        print('invalid json: ' + filename)
        return None # or: raise
Breakable Bee