1 #ifndef JSON_VALIDATOR_H
2 #define JSON_VALIDATOR_H
8 #ifdef JSON_SECURITY_MAX_NEST_LEVEL
9 #define DEPTH_PARAM ,size_t depth_param
10 #define DEPTH_ARG(arg) ,arg
12 if (++depth_param > JSON_SECURITY_MAX_NEST_LEVEL){\
13 JSON_FAIL(JSON_TEXT("Exceeded JSON_SECURITY_MAX_NEST_LEVEL"));\
18 #define DEPTH_ARG(arg)
19 #define INC_DEPTH() (void)0
24 static bool isValidNumber(
const json_char * & ptr) json_nothrow json_read_priority;
25 static bool isValidMember(
const json_char * & ptr DEPTH_PARAM) json_nothrow json_read_priority;
26 static bool isValidString(
const json_char * & ptr) json_nothrow json_read_priority;
27 static bool isValidNamedObject(
const json_char * & ptr DEPTH_PARAM) json_nothrow json_read_priority;
28 static bool isValidObject(
const json_char * & ptr DEPTH_PARAM) json_nothrow json_read_priority;
29 static bool isValidArray(
const json_char * & ptr DEPTH_PARAM) json_nothrow json_read_priority;
30 static bool isValidRoot(
const json_char * json) json_nothrow json_read_priority;
32 static bool isValidPartialRoot(
const json_char * json) json_nothrow json_read_priority;