switch to simplejson

This commit is contained in:
brindosch 2017-02-08 21:19:50 +01:00
parent d08f744ee8
commit 3819ae72ca
2 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
```
sudo apt-get update
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev python-simplejson
```
**ATTENTION Win10LinuxSubsystem** we do not (/we can't) support using hyperion in linux subsystem of MS Windows 10, albeit some users tested it with success. Keep in mind to disable

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
import json, sys, glob
import simplejson, sys, glob
from os import path
from jsonschema import Draft3Validator
@ -12,14 +12,14 @@ retval = 0
total = 0
errors = 0
with open("libsrc/effectengine/EffectDefinition.schema.json") as baseSchemaFile:
baseSchema = json.load(baseSchemaFile)
baseSchema = simplejson.load(baseSchemaFile)
baseValidator = Draft3Validator(baseSchema)
for filename in glob.glob(jsonFiles+'/*.json'):
with open(filename) as f:
total += 1
msg = " check effect %s ... " % filename
try:
effect = json.load(f)
effect = simplejson.load(f)
script = path.basename(effect['script'])
if not path.exists(jsonFiles+'/'+script):
raise ValueError('script file: '+script+' not found.')
@ -31,7 +31,7 @@ with open("libsrc/effectengine/EffectDefinition.schema.json") as baseSchemaFile:
# validate against schema
with open(schema) as s:
effectSchema = json.load(s)
effectSchema = simplejson.load(s)
Draft3Validator.check_schema(effectSchema)
validator = Draft3Validator(effectSchema)
baseValidator.validate(effect)