def validate(schema_file=None, jams_files=None):
schema = load_json(schema_file)<EOL>for jams_file in jams_files:<EOL><INDENT>try:<EOL><INDENT>jams = load_json(jams_file)<EOL>jsonschema.validate(jams, schema)<EOL>print('<STR_LIT>'.format(jams_file))<EOL><DEDENT>except jsonschema.ValidationError as exc:<EOL><INDENT>print('<STR_LIT>'.format(jams_file))<EOL>print(exc)<EOL><DEDENT><DEDENT>
Validate a jams file against a schema