mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
tools: improve the JSON validation plugin
This commit is contained in:
parent
8d2581bacb
commit
c3502d1085
1 changed files with 5 additions and 1 deletions
|
|
@ -312,7 +312,11 @@ if len(sys.argv) < 2:
|
|||
print_validate_json_usage()
|
||||
|
||||
json_file = open(sys.argv[1], "r", encoding='utf-8')
|
||||
json_data = json.loads(json_file.read())
|
||||
try:
|
||||
json_data = json.loads(json_file.read())
|
||||
except ValueError:
|
||||
print(sys.argv[1] + " file has a wrong JSON format!!!!!")
|
||||
exit(1)
|
||||
|
||||
for __key, __value in json_data.items():
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue