Changed the #define values of cJSON* data types

We can use bitops to check if the parsed JSON is of a particular types
using OR
This commit is contained in:
Eswar Yaganti 2016-02-09 22:52:10 +05:30
parent e95313adad
commit 51371c899e
1 changed files with 7 additions and 7 deletions

14
cJSON.h
View File

@ -29,13 +29,13 @@ extern "C"
#endif
/* cJSON Types: */
#define cJSON_False 0
#define cJSON_True 1
#define cJSON_NULL 2
#define cJSON_Number 3
#define cJSON_String 4
#define cJSON_Array 5
#define cJSON_Object 6
#define cJSON_False 1 << 0
#define cJSON_True 1 << 1
#define cJSON_NULL 1 << 2
#define cJSON_Number 1 << 3
#define cJSON_String 1 << 4
#define cJSON_Array 1 << 5
#define cJSON_Object 1 << 6
#define cJSON_IsReference 256
#define cJSON_StringIsConst 512