json_schema.py

About this file

This file contains the function to validate JSON against an inputted schema file. An error is reported if there was an error upon validation.

The function 'validate_schema(data, schema_name)' uses JSON data to be validated and Name of the schema as parameters to return boolean result (True or False).

Code Check Report


app/lib/json_schema.py:13:43: W291 trailing whitespace
                        

Documentation drawn from source code


validate_schema(data, schema_name):

Validate the provided data against the provided JSON schema.

:param data: JSON data to be validated
:param schema_name: Name of the schema
:return: Boolean

Source code