Provide support for 64-bit integers
Brought to you by:
davegamble
I'd like the ability to parse/store integers larger than an int. On most platforms int is 32-bits. So any positive value larger than 31 bits does not work without hacks/workarounds. This is a common use case for me since I'm storing Product IDs which are typically 32 bit long unsigned values.
The easiest is to change the struct:
typedef struct cJSON {
struct cJSON next,prev;
struct cJSON child;
int type;
char valuestring;
long long valueint;
double valuedouble;
char *string;
} cJSON;
But of course code around it and tests would need to be updated. I assume the change needs to be opt-in so a typedef surrounded by #define needs to be created.