FreeSWITCH API Documentation
1.7.0
|
#include "switch.h"
Go to the source code of this file.
Data Structures | |
struct | cJSON |
struct | cJSON_Hooks |
Macros | |
#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_IsReference 256 |
#define | cJSON_AddNullToObject(object, name) cJSON_AddItemToObject(object, name, cJSON_CreateNull()) |
#define | cJSON_AddTrueToObject(object, name) cJSON_AddItemToObject(object, name, cJSON_CreateTrue()) |
#define | cJSON_AddFalseToObject(object, name) cJSON_AddItemToObject(object, name, cJSON_CreateFalse()) |
#define | cJSON_AddNumberToObject(object, name, n) cJSON_AddItemToObject(object, name, cJSON_CreateNumber(n)) |
#define | cJSON_AddStringToObject(object, name, s) cJSON_AddItemToObject(object, name, cJSON_CreateString(s)) |
Typedefs | |
typedef struct cJSON | cJSON |
typedef struct cJSON_Hooks | cJSON_Hooks |
Functions | |
void | cJSON_InitHooks (cJSON_Hooks *hooks) |
cJSON * | cJSON_Parse (const char *value) |
char * | cJSON_Print (cJSON *item) |
char * | cJSON_PrintUnformatted (cJSON *item) |
void | cJSON_Delete (cJSON *c) |
int | cJSON_GetArraySize (cJSON *array) |
cJSON * | cJSON_GetArrayItem (cJSON *array, int item) |
cJSON * | cJSON_GetObjectItem (const cJSON *object, const char *string) |
const char * | cJSON_GetObjectCstr (const cJSON *object, const char *string) |
const char * | cJSON_GetErrorPtr (void) |
cJSON * | cJSON_CreateNull (void) |
cJSON * | cJSON_CreateTrue (void) |
cJSON * | cJSON_CreateFalse (void) |
cJSON * | cJSON_CreateBool (int b) |
cJSON * | cJSON_CreateNumber (double num) |
cJSON * | cJSON_CreateString (const char *string) |
cJSON * | cJSON_CreateArray (void) |
cJSON * | cJSON_CreateObject (void) |
cJSON * | cJSON_CreateIntArray (int *numbers, int count) |
cJSON * | cJSON_CreateFloatArray (float *numbers, int count) |
cJSON * | cJSON_CreateDoubleArray (double *numbers, int count) |
cJSON * | cJSON_CreateStringArray (const char **strings, int count) |
void | cJSON_AddItemToArray (cJSON *array, cJSON *item) |
void | cJSON_AddItemToObject (cJSON *object, const char *string, cJSON *item) |
void | cJSON_AddItemReferenceToArray (cJSON *array, cJSON *item) |
void | cJSON_AddItemReferenceToObject (cJSON *object, const char *string, cJSON *item) |
cJSON * | cJSON_DetachItemFromArray (cJSON *array, int which) |
void | cJSON_DeleteItemFromArray (cJSON *array, int which) |
cJSON * | cJSON_DetachItemFromObject (cJSON *object, const char *string) |
void | cJSON_DeleteItemFromObject (cJSON *object, const char *string) |
void | cJSON_ReplaceItemInArray (cJSON *array, int which, cJSON *newitem) |
void | cJSON_ReplaceItemInObject (cJSON *object, const char *string, cJSON *newitem) |
cJSON * | cJSON_Duplicate (cJSON *item, int recurse) |
cJSON * | cJSON_CreateStringPrintf (const char *fmt,...) |
static cJSON * | json_add_child_obj (cJSON *json, const char *name, cJSON *obj) |
static cJSON * | json_add_child_array (cJSON *json, const char *name) |
static cJSON * | json_add_child_string (cJSON *json, const char *name, const char *val) |
#define cJSON_AddFalseToObject | ( | object, | |
name | |||
) | cJSON_AddItemToObject(object, name, cJSON_CreateFalse()) |
Definition at line 127 of file switch_json.h.
#define cJSON_AddNullToObject | ( | object, | |
name | |||
) | cJSON_AddItemToObject(object, name, cJSON_CreateNull()) |
Definition at line 125 of file switch_json.h.
#define cJSON_AddNumberToObject | ( | object, | |
name, | |||
n | |||
) | cJSON_AddItemToObject(object, name, cJSON_CreateNumber(n)) |
Definition at line 128 of file switch_json.h.
#define cJSON_AddStringToObject | ( | object, | |
name, | |||
s | |||
) | cJSON_AddItemToObject(object, name, cJSON_CreateString(s)) |
Definition at line 129 of file switch_json.h.
#define cJSON_AddTrueToObject | ( | object, | |
name | |||
) | cJSON_AddItemToObject(object, name, cJSON_CreateTrue()) |
Definition at line 126 of file switch_json.h.
#define cJSON_Array 5 |
Definition at line 37 of file switch_json.h.
Referenced by cJSON_CreateArray(), parse_array(), print_value(), and switch_event_create_json().
#define cJSON_False 0 |
Definition at line 32 of file switch_json.h.
Referenced by cJSON_CreateBool(), cJSON_CreateFalse(), parse_value(), and print_value().
#define cJSON_IsReference 256 |
Definition at line 40 of file switch_json.h.
Referenced by cJSON_Delete(), cJSON_Duplicate(), and create_reference().
#define cJSON_NULL 2 |
Definition at line 34 of file switch_json.h.
Referenced by cJSON_CreateNull(), parse_value(), and print_value().
#define cJSON_Number 3 |
Definition at line 35 of file switch_json.h.
Referenced by cJSON_CreateNumber(), parse_number(), and print_value().
#define cJSON_Object 6 |
Definition at line 38 of file switch_json.h.
Referenced by cJSON_CreateObject(), parse_object(), and print_value().
#define cJSON_String 4 |
Definition at line 36 of file switch_json.h.
Referenced by cJSON_CreateString(), cJSON_CreateStringPrintf(), cJSON_GetObjectCstr(), parse_string(), print_value(), and switch_event_create_json().
#define cJSON_True 1 |
Definition at line 33 of file switch_json.h.
Referenced by cJSON_CreateBool(), cJSON_CreateTrue(), parse_value(), and print_value().
typedef struct cJSON_Hooks cJSON_Hooks |
Definition at line 521 of file switch_json.c.
References cJSON_AddItemToArray(), and create_reference().
Definition at line 522 of file switch_json.c.
References cJSON_AddItemToObject(), and create_reference().
Definition at line 519 of file switch_json.c.
References cJSON::child, cJSON::next, and suffix_object().
Referenced by cJSON_AddItemReferenceToArray(), cJSON_AddItemToObject(), switch_event_serialize_json_obj(), switch_ivr_generate_json_cdr(), switch_ivr_set_json_call_stats(), and switch_live_array_bootstrap().
Definition at line 520 of file switch_json.c.
References cJSON_AddItemToArray(), cJSON_free, and cJSON_strdup().
Referenced by cJSON_AddItemReferenceToObject(), json_add_child_array(), json_add_child_obj(), json_add_child_string(), switch_event_serialize_json_obj(), switch_ivr_generate_json_cdr(), switch_ivr_set_json_call_stats(), switch_ivr_set_json_chan_vars(), switch_ivr_set_json_profile_data(), switch_json_api_execute(), switch_live_array_add(), switch_live_array_bootstrap(), switch_live_array_clear(), switch_live_array_del(), and switch_live_array_visible().
cJSON* cJSON_CreateArray | ( | void | ) |
Definition at line 543 of file switch_json.c.
References cJSON_Array, cJSON_New_Item(), and cJSON::type.
Referenced by cJSON_CreateDoubleArray(), cJSON_CreateFloatArray(), cJSON_CreateIntArray(), cJSON_CreateStringArray(), json_add_child_array(), switch_event_serialize_json_obj(), switch_ivr_generate_json_cdr(), switch_ivr_set_json_call_stats(), and switch_live_array_bootstrap().
cJSON* cJSON_CreateBool | ( | int | b | ) |
Definition at line 540 of file switch_json.c.
References cJSON_False, cJSON_New_Item(), cJSON_True, and cJSON::type.
cJSON* cJSON_CreateDoubleArray | ( | double * | numbers, |
int | count | ||
) |
Definition at line 549 of file switch_json.c.
References cJSON_CreateArray(), cJSON_CreateNumber(), and suffix_object().
cJSON* cJSON_CreateFalse | ( | void | ) |
Definition at line 539 of file switch_json.c.
References cJSON_False, cJSON_New_Item(), and cJSON::type.
cJSON* cJSON_CreateFloatArray | ( | float * | numbers, |
int | count | ||
) |
Definition at line 548 of file switch_json.c.
References cJSON_CreateArray(), cJSON_CreateNumber(), and suffix_object().
cJSON* cJSON_CreateIntArray | ( | int * | numbers, |
int | count | ||
) |
Definition at line 547 of file switch_json.c.
References cJSON_CreateArray(), cJSON_CreateNumber(), and suffix_object().
cJSON* cJSON_CreateNull | ( | void | ) |
Definition at line 537 of file switch_json.c.
References cJSON_New_Item(), cJSON_NULL, and cJSON::type.
Referenced by switch_json_api_execute().
cJSON* cJSON_CreateNumber | ( | double | num | ) |
Definition at line 541 of file switch_json.c.
References cJSON_New_Item(), cJSON_Number, cJSON::type, cJSON::valuedouble, and cJSON::valueint.
Referenced by cJSON_CreateDoubleArray(), cJSON_CreateFloatArray(), cJSON_CreateIntArray(), switch_ivr_set_json_call_stats(), switch_live_array_add(), switch_live_array_bootstrap(), switch_live_array_clear(), switch_live_array_del(), and switch_live_array_visible().
cJSON* cJSON_CreateObject | ( | void | ) |
Definition at line 544 of file switch_json.c.
References cJSON_New_Item(), cJSON_Object, and cJSON::type.
Referenced by json_add_child_obj(), switch_event_serialize_json_obj(), switch_ivr_generate_json_cdr(), switch_ivr_set_json_call_stats(), switch_live_array_add(), switch_live_array_bootstrap(), switch_live_array_clear(), switch_live_array_del(), and switch_live_array_visible().
cJSON* cJSON_CreateString | ( | const char * | string | ) |
Definition at line 542 of file switch_json.c.
References cJSON_New_Item(), cJSON_strdup(), cJSON_String, cJSON::type, and cJSON::valuestring.
Referenced by cJSON_CreateStringArray(), json_add_child_string(), la_broadcast(), switch_event_serialize_json_obj(), switch_ivr_generate_json_cdr(), switch_ivr_set_json_chan_vars(), switch_ivr_set_json_profile_data(), switch_json_api_execute(), switch_live_array_add(), switch_live_array_bootstrap(), switch_live_array_clear(), switch_live_array_del(), and switch_live_array_visible().
cJSON* cJSON_CreateStringArray | ( | const char ** | strings, |
int | count | ||
) |
Definition at line 550 of file switch_json.c.
References cJSON_CreateArray(), cJSON_CreateString(), and suffix_object().
cJSON* cJSON_CreateStringPrintf | ( | const char * | fmt, |
... | |||
) |
Definition at line 580 of file switch_json.c.
References cJSON_New_Item(), cJSON_String, switch_vmprintf(), cJSON::type, and cJSON::valuestring.
cJSON* cJSON_CreateTrue | ( | void | ) |
Definition at line 538 of file switch_json.c.
References cJSON_New_Item(), cJSON_True, and cJSON::type.
void cJSON_Delete | ( | cJSON * | c | ) |
Definition at line 93 of file switch_json.c.
References cJSON_free, cJSON_IsReference, cJSON::next, and switch_jb_node_s::next.
Referenced by cJSON_DeleteItemFromArray(), cJSON_DeleteItemFromObject(), cJSON_Duplicate(), cJSON_Parse(), cJSON_ReplaceItemInArray(), destroy_ecd(), switch_event_channel_broadcast(), switch_event_create_json(), switch_event_serialize_json(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_live_array_add(), and switch_live_array_clear().
void cJSON_DeleteItemFromArray | ( | cJSON * | array, |
int | which | ||
) |
Definition at line 526 of file switch_json.c.
References cJSON_Delete(), and cJSON_DetachItemFromArray().
void cJSON_DeleteItemFromObject | ( | cJSON * | object, |
const char * | string | ||
) |
Definition at line 528 of file switch_json.c.
References cJSON_Delete(), and cJSON_DetachItemFromObject().
Definition at line 524 of file switch_json.c.
References cJSON::child, cJSON::next, and cJSON::prev.
Referenced by cJSON_DeleteItemFromArray(), and cJSON_DetachItemFromObject().
Definition at line 527 of file switch_json.c.
References cJSON::child, cJSON_DetachItemFromArray(), cJSON_strcasecmp(), cJSON::next, and cJSON::string.
Referenced by cJSON_DeleteItemFromObject().
Definition at line 553 of file switch_json.c.
References cJSON::child, cJSON_Delete(), cJSON_IsReference, cJSON_New_Item(), cJSON_strdup(), if(), cJSON::next, cJSON::prev, cJSON::string, cJSON::type, cJSON::valuedouble, cJSON::valueint, and cJSON::valuestring.
Referenced by la_broadcast(), switch_live_array_add(), switch_live_array_bootstrap(), switch_live_array_get(), and switch_live_array_get_idx().
Definition at line 497 of file switch_json.c.
References cJSON::child, and cJSON::next.
Referenced by switch_event_create_json().
int cJSON_GetArraySize | ( | cJSON * | array | ) |
Definition at line 496 of file switch_json.c.
References cJSON::child, and cJSON::next.
Referenced by switch_event_create_json().
const char* cJSON_GetErrorPtr | ( | void | ) |
const char* cJSON_GetObjectCstr | ( | const cJSON * | object, |
const char * | string | ||
) |
Definition at line 501 of file switch_json.c.
References cJSON_GetObjectItem(), cJSON_String, cJSON::type, and cJSON::valuestring.
Referenced by switch_live_array_parse_json().
Definition at line 498 of file switch_json.c.
References cJSON::child, cJSON_strcasecmp(), cJSON::next, and cJSON::string.
Referenced by cJSON_GetObjectCstr(), la_broadcast(), switch_json_api_execute(), and switch_live_array_parse_json().
void cJSON_InitHooks | ( | cJSON_Hooks * | hooks | ) |
cJSON* cJSON_Parse | ( | const char * | value | ) |
Definition at line 273 of file switch_json.c.
References cJSON_Delete(), cJSON_New_Item(), ep, parse_value(), and skip().
Referenced by switch_event_create_json().
char* cJSON_Print | ( | cJSON * | item | ) |
char* cJSON_PrintUnformatted | ( | cJSON * | item | ) |
Definition at line 285 of file switch_json.c.
References print_value().
Referenced by switch_event_serialize_json(), switch_ivr_multi_threaded_bridge(), and switch_ivr_originate().
Definition at line 531 of file switch_json.c.
References cJSON::child, cJSON_Delete(), cJSON::next, and cJSON::prev.
Referenced by cJSON_ReplaceItemInObject().
Definition at line 534 of file switch_json.c.
References cJSON::child, cJSON_ReplaceItemInArray(), cJSON_strcasecmp(), cJSON_strdup(), cJSON::next, and cJSON::string.
Referenced by la_broadcast().
Definition at line 152 of file switch_json.h.
References cJSON_AddItemToObject(), cJSON_CreateArray(), and switch_assert.
Referenced by switch_live_array_bootstrap().
Definition at line 133 of file switch_json.h.
References cJSON_AddItemToObject(), cJSON_CreateObject(), and switch_assert.
Referenced by switch_live_array_add(), switch_live_array_bootstrap(), switch_live_array_clear(), switch_live_array_del(), and switch_live_array_visible().
|
inlinestatic |
Definition at line 166 of file switch_json.h.
References cJSON_AddItemToObject(), cJSON_CreateString(), and switch_assert.
Referenced by switch_json_add_presence_data_cols().