#371: data_validator.py, return JSON formatted error

Resolves #371.