Lawrence Tang | 8a2d737 | 2022-07-12 16:44:49 +0100 | [diff] [blame] | 1 | #ifndef JSON_SCHEMA_H |
| 2 | #define JSON_SCHEMA_H |
| 3 | |
| 4 | #include "json.h" |
| 5 | |
| 6 | #define JSON_SCHEMA_VERSION "https://json-schema.org/draft/2020-12/schema" |
Lawrence Tang | 8f793ac | 2022-07-13 10:17:09 +0100 | [diff] [blame] | 7 | #define JSON_ERROR_MSG_MAX_LEN 512 |
Lawrence Tang | 8a2d737 | 2022-07-12 16:44:49 +0100 | [diff] [blame] | 8 | |
| 9 | int validate_schema(json_object* schema, char* schema_directory, json_object* object, char* error_message); |
| 10 | int validate_schema_from_file(const char* schema_file, json_object* object, char* error_message); |
Lawrence Tang | 8f793ac | 2022-07-13 10:17:09 +0100 | [diff] [blame] | 11 | void validate_schema_debug_enable(); |
| 12 | void validate_schema_debug_disable(); |
Lawrence Tang | 8a2d737 | 2022-07-12 16:44:49 +0100 | [diff] [blame] | 13 | |
| 14 | #endif |