typedef struct _MicrofeedJson MicrofeedJson |
Definition at line 16 of file microfeedjson.h.
typedef int(* MicrofeedJsonCompareMembersFunction)(MicrofeedJson *json, unsigned int index1, unsigned int index2, void *user_data) |
Definition at line 28 of file microfeedjson.h.
enum MicrofeedJsonType |
MICROFEED_JSON_TYPE_NULL | |
MICROFEED_JSON_TYPE_OBJECT | |
MICROFEED_JSON_TYPE_ARRAY | |
MICROFEED_JSON_TYPE_INTEGER | |
MICROFEED_JSON_TYPE_DECIMAL | |
MICROFEED_JSON_TYPE_STRING | |
MICROFEED_JSON_TYPE_BOOLEAN |
Definition at line 18 of file microfeedjson.h.
void microfeed_json_append_boolean | ( | MicrofeedJson * | json, | |
int | boolean | |||
) |
Definition at line 583 of file microfeedjson.c.
References Member::boolean, _MicrofeedJson::members, MICROFEED_JSON_TYPE_BOOLEAN, and microfeed_store_insert().
void microfeed_json_append_null | ( | MicrofeedJson * | json, | |
MicrofeedJson * | object | |||
) |
Definition at line 530 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_NULL, and microfeed_store_insert().
void microfeed_json_append_object | ( | MicrofeedJson * | json, | |
MicrofeedJson * | object | |||
) |
Definition at line 547 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_insert(), and Member::object.
void microfeed_json_append_string | ( | MicrofeedJson * | json, | |
const char * | string | |||
) |
Definition at line 565 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_STRING, microfeed_store_insert(), and Member::string.
int microfeed_json_compare_members | ( | MicrofeedJson * | json, | |
unsigned int | index1, | |||
unsigned int | index2 | |||
) |
Definition at line 603 of file microfeedjson.c.
References Member::boolean, Member::decimal, Member::integer, _MicrofeedJson::members, MICROFEED_JSON_TYPE_BOOLEAN, MICROFEED_JSON_TYPE_DECIMAL, MICROFEED_JSON_TYPE_INTEGER, MICROFEED_JSON_TYPE_STRING, microfeed_store_get_index, Member::string, and Member::type.
void microfeed_json_free | ( | MicrofeedJson * | json | ) |
Definition at line 90 of file microfeedjson.c.
References _MicrofeedJson::members, microfeed_memory_free(), microfeed_store_foreach(), microfeed_store_free(), and _MicrofeedJson::parent.
MicrofeedJson* microfeed_json_get_array | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 267 of file microfeedjson.c.
References Member::array, _MicrofeedJson::members, MICROFEED_JSON_TYPE_ARRAY, microfeed_store_get, microfeed_store_is_sorted(), and Member::type.
MicrofeedJson* microfeed_json_get_array_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 284 of file microfeedjson.c.
References Member::array, _MicrofeedJson::members, MICROFEED_JSON_TYPE_ARRAY, microfeed_store_get_index, and Member::type.
MicrofeedJson* microfeed_json_get_array_by_path | ( | MicrofeedJson * | json, | |
const char * | name, | |||
... | ||||
) |
Definition at line 295 of file microfeedjson.c.
References Member::array, _MicrofeedJson::members, MICROFEED_JSON_TYPE_ARRAY, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get, Member::object, and Member::type.
const char* microfeed_json_get_as_string | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 401 of file microfeedjson.c.
References _MicrofeedJson::members, and microfeed_store_get.
const char* microfeed_json_get_as_string_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 414 of file microfeedjson.c.
References _MicrofeedJson::members, and microfeed_store_get_index.
const char* microfeed_json_get_as_string_by_path | ( | MicrofeedJson * | json, | |
const char * | name, | |||
... | ||||
) |
Definition at line 425 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get, Member::object, and Member::type.
int microfeed_json_get_boolean | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 359 of file microfeedjson.c.
References Member::boolean, _MicrofeedJson::members, MICROFEED_JSON_TYPE_BOOLEAN, microfeed_store_get, and Member::type.
int microfeed_json_get_boolean_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 370 of file microfeedjson.c.
References Member::boolean, _MicrofeedJson::members, MICROFEED_JSON_TYPE_BOOLEAN, microfeed_store_get_index, and Member::type.
int microfeed_json_get_boolean_by_path | ( | MicrofeedJson * | json, | |
const char * | name, | |||
... | ||||
) |
Definition at line 381 of file microfeedjson.c.
References Member::boolean, _MicrofeedJson::members, MICROFEED_JSON_TYPE_BOOLEAN, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get, Member::object, and Member::type.
const char* microfeed_json_get_name_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 177 of file microfeedjson.c.
References _MicrofeedJson::members, microfeed_store_get_index, and Member::name.
MicrofeedJson* microfeed_json_get_object | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 219 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get, microfeed_store_is_sorted(), Member::object, and Member::type.
MicrofeedJson* microfeed_json_get_object_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 236 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get_index, Member::object, and Member::type.
MicrofeedJson* microfeed_json_get_object_by_path | ( | MicrofeedJson * | json, | |
const char * | name, | |||
... | ||||
) |
Definition at line 247 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get, Member::object, and Member::type.
MicrofeedJson* microfeed_json_get_parent | ( | MicrofeedJson * | json | ) |
unsigned int microfeed_json_get_size | ( | MicrofeedJson * | json | ) |
Definition at line 111 of file microfeedjson.c.
References _MicrofeedJson::members, and microfeed_store_get_size().
const char* microfeed_json_get_string | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 315 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_STRING, microfeed_store_get, Member::string, and Member::type.
const char* microfeed_json_get_string_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 328 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_STRING, microfeed_store_get_index, Member::string, and Member::type.
const char* microfeed_json_get_string_by_path | ( | MicrofeedJson * | json, | |
const char * | name, | |||
... | ||||
) |
Definition at line 339 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_OBJECT, MICROFEED_JSON_TYPE_STRING, microfeed_store_get, Member::object, Member::string, and Member::type.
MicrofeedJsonType microfeed_json_get_type | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 116 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_ARRAY, MICROFEED_JSON_TYPE_NULL, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get, microfeed_store_is_sorted(), and Member::type.
MicrofeedJsonType microfeed_json_get_type_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 131 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_NULL, microfeed_store_get_index, and Member::type.
MicrofeedJsonType microfeed_json_get_type_by_path | ( | MicrofeedJson * | json, | |
const char * | name, | |||
... | ||||
) |
Definition at line 142 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_NULL, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get, Member::object, and Member::type.
int microfeed_json_is_array | ( | MicrofeedJson * | json | ) |
Definition at line 101 of file microfeedjson.c.
References _MicrofeedJson::members, and microfeed_store_is_sorted().
int microfeed_json_is_null | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 162 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_NULL, microfeed_store_get, and Member::type.
int microfeed_json_is_null_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 188 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_NULL, microfeed_store_get_index, and Member::type.
int microfeed_json_is_null_by_path | ( | MicrofeedJson * | json, | |
const char * | name1, | |||
... | ||||
) |
Definition at line 199 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_NULL, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_get, Member::object, and Member::type.
MicrofeedJson* microfeed_json_new_array | ( | void | ) |
Definition at line 61 of file microfeedjson.c.
References _MicrofeedJson::members, microfeed_memory_allocate, and microfeed_store_new_unsorted().
MicrofeedJson* microfeed_json_new_from_data | ( | const char * | data, | |
size_t | length | |||
) |
Definition at line 70 of file microfeedjson.c.
References Member::array, MICROFEED_JSON_TYPE_ARRAY, MICROFEED_JSON_TYPE_OBJECT, Member::object, and Member::type.
Referenced by microfeed_http_get_json(), and microfeed_http_post_json().
MicrofeedJson* microfeed_json_new_object | ( | void | ) |
Definition at line 52 of file microfeedjson.c.
References _MicrofeedJson::members, microfeed_memory_allocate, and microfeed_store_new_sorted().
void microfeed_json_set_boolean | ( | MicrofeedJson * | json, | |
const char * | name, | |||
int | boolean | |||
) |
Definition at line 573 of file microfeedjson.c.
References Member::boolean, _MicrofeedJson::members, MICROFEED_JSON_TYPE_BOOLEAN, and microfeed_store_replace.
void microfeed_json_set_null | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 521 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_NULL, and microfeed_store_replace.
void microfeed_json_set_object | ( | MicrofeedJson * | json, | |
const char * | name, | |||
MicrofeedJson * | object | |||
) |
Definition at line 537 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_OBJECT, microfeed_store_replace, and Member::object.
void microfeed_json_set_string | ( | MicrofeedJson * | json, | |
const char * | name, | |||
const char * | string | |||
) |
Definition at line 555 of file microfeedjson.c.
References _MicrofeedJson::members, MICROFEED_JSON_TYPE_STRING, microfeed_store_replace, and Member::string.
void microfeed_json_sort_array | ( | MicrofeedJson * | json, | |
MicrofeedJsonCompareMembersFunction | compare_members, | |||
void * | user_data | |||
) |
Definition at line 592 of file microfeedjson.c.
References compare_json_members_in_sort(), SortData::compare_members, SortData::json, _MicrofeedJson::members, microfeed_memory_allocate, microfeed_memory_free(), microfeed_store_sort(), and SortData::user_data.
char* microfeed_json_to_string | ( | MicrofeedJson * | json, | |
const char * | name | |||
) |
Definition at line 445 of file microfeedjson.c.
References _MicrofeedJson::members, microfeed_store_get, microfeed_store_is_sorted(), microfeed_store_iterate(), microfeed_store_iterator_free(), microfeed_store_iterator_get, microfeed_store_iterator_next(), and Member::name.
char* microfeed_json_to_string_by_index | ( | MicrofeedJson * | json, | |
unsigned int | index | |||
) |
Definition at line 506 of file microfeedjson.c.
References _MicrofeedJson::members, and microfeed_store_get_index.
char* microfeed_json_to_string_by_path | ( | MicrofeedJson * | json, | |
const char * | name, | |||
... | ||||
) |