mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-27 22:11:10 +00:00
14 lines
304 B
Python
14 lines
304 B
Python
import os
|
|
import sys
|
|
import json
|
|
|
|
if len(sys.argv) > 1:
|
|
if os.path.exists(sys.argv[1]):
|
|
file = open(sys.argv[1], "r")
|
|
json.load(file)
|
|
file.close()
|
|
print("Validate JSON!")
|
|
else:
|
|
print(sys.argv[1] + " not found")
|
|
else:
|
|
print("Usage: checkjson.py <file>") |