File: validate_json.py

package info (click to toggle)
montage 6.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 45,580 kB
  • sloc: ansic: 144,907; javascript: 4,636; python: 1,625; makefile: 1,447; sh: 230; xml: 48
file content (14 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# This script just ensures that all the JSON files can be parsed correctly

from __future__ import print_function

import os
import glob
import json

MONTAGELIB = os.path.join('..', '..', 'MontageLib')
    
for json_file in glob.glob(os.path.join(MONTAGELIB, '*', '*.json')):
    print("Validating {0}...".format(json_file))
    with open(json_file, 'r') as fjson:
        data = json.load(fjson)