Documentation

Documentation

Includes

Macros

Marco ty_cJSON__h

#define ty_cJSON__h


      

Marco ty_cJSON_AddNullToObject(object,name)

#define ty_cJSON_AddNullToObject(object,name)	ty_cJSON_AddItemToObject(object, name, ty_cJSON_CreateNull())
/* Macros for creating things quickly. */

Marco ty_cJSON_AddTrueToObject(object,name)

#define ty_cJSON_AddTrueToObject(object,name)	ty_cJSON_AddItemToObject(object, name, ty_cJSON_CreateTrue())


      

Marco ty_cJSON_AddFalseToObject(object,name)

#define ty_cJSON_AddFalseToObject(object,name)	ty_cJSON_AddItemToObject(object, name, ty_cJSON_CreateFalse())


      

Marco ty_cJSON_AddBoolToObject(object,name,b)

#define ty_cJSON_AddBoolToObject(object,name,b)    ty_cJSON_AddItemToObject(object, name, ty_cJSON_CreateBool(b))


      

Marco ty_cJSON_AddNumberToObject(object,name,n)

#define ty_cJSON_AddNumberToObject(object,name,n) ty_cJSON_AddItemToObject(object, name, ty_cJSON_CreateNumber(n))


      

Marco ty_cJSON_AddStringToObject(object,name,s)

#define ty_cJSON_AddStringToObject(object,name,s) ty_cJSON_AddItemToObject(object, name, ty_cJSON_CreateString(s))


      

Marco ty_cJSON_SetIntValue(object,val)

#define ty_cJSON_SetIntValue(object,val)		((object)?(object)->valueint=(object)->valuedouble=(val):(val))
/* When assigning an integer value, it needs to be propagated to valuedouble too. */

Marco ty_cJSON_ArrayForEach(pos, head)

#define ty_cJSON_ArrayForEach(pos, head)           for(pos = (head)->child; pos != NULL; pos = pos->next)
/* Macro for iterating over an array */

Functions

Vars

Variable endif

{
#endif

#include 

/* ty_cJSON Types: */
#define ty_cJSON_False 0
#define ty_cJSON_True 1
#define ty_cJSON_NULL 2
#define ty_cJSON_Number 3
#define ty_cJSON_String 4
#define ty_cJSON_Array 5
#define ty_cJSON_Object 6

#define ty_cJSON_IsReference 256

/* The ty_cJSON structure: */
typedef struct ty_cJSON {
   struct ty_cJSON *next,*prev; /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
   struct ty_cJSON *child;	/* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */

   int type;				/* The type of the item, as above. */

   char *valuestring;		/* The item's string, if type==ty_cJSON_String */
   int valueint;			/* The item's number, if type==ty_cJSON_Number */
   double valuedouble;		/* The item's number, if type==ty_cJSON_Number */

   char *string;			/* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
} ty_cJSON;

      

Consts

Types

Typedefs