mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-12-18 08:10:20 +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>") |