You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cJSON has plans to use union in the future(milestone 2.0.0), for details, please see #63. But int64_t is incompatible with c89, it may not be acceptable in the short term.
typedef struct cJSON {
struct cJSON *next, *prev;
struct cJSON *child;
int type;
char *valuestring;
int valueint;
double valuedouble;
char *string;
} cJSON;
size_t size = sizeof(cJSON) = 40
typedef struct cJSON {
struct cJSON *next, *prev;
struct cJSON *child;
int type;
char *string;
union Value
{
char *valuestring;
//int valueint; // can not save 0xFFFF FFFF FFFF FFFF
int64_t valuelong; // can save 0xFFFF FFFF FFFF FFFF
double valuedouble;
} value;
} cJSON;
size_t size = sizeof(cJSON) = 32
when we use cJSON for embedded device(such as: ARM Cortex M3/M4/M7), the memory is very small.
The text was updated successfully, but these errors were encountered: