mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
21 lines
399 B
Python
21 lines
399 B
Python
import sys
|
|
import json
|
|
|
|
if len(sys.argv) <= 1:
|
|
exit(1)
|
|
|
|
status = 0
|
|
|
|
for file in sys.argv[1:]:
|
|
with open(file, encoding="ISO-8859-1") as f:
|
|
try:
|
|
json.load(f)
|
|
except ValueError as exception:
|
|
print("JSON error in {}".format(file))
|
|
print(exception)
|
|
status = 1
|
|
else:
|
|
print("Valid {}".format(file))
|
|
|
|
exit(status)
|