Object
assemble_json_object_member_add
AJsonValue *assemble_json_object_member_add(AJsonValue *object, AJsonValue *value, char *name);
Description: Attaches a value as a member to a value object, under the name "name". the function will returned an updated pointer to the value beeing inserted.assemble_json_object_member_add_create
AJsonValue *assemble_json_object_member_add_create(AJsonValue *object, char *name, AJsonType type, void *data);
Description: Creates a new value and inserts it to a object value under the name "name". The new value will be of type "type". If the value is of type A_JT_NUMBER, the "number" param will be used to set its value. If the value is of type A_JT_STRING, the "string" param will be used to set its value. The function will return a pointer to the new object.Types:
Enum:
AJsonType
A_JT_BOOLEAN |
|
= |
|
0 |
|
A_JT_NUMBER |
|
= |
|
1 |
|
A_JT_STRING |
|
= |
|
2 |
|
A_JT_OBJECT |
|
= |
|
3 |
|
A_JT_ARRAY |
|
= |
|
4 |
|
A_JT_NULL |
|
= |
|
5 |
|
A_JT_MODULO |
|
= |
|
8 |
Description: |
A_JT_FALSE |
|
= |
|
A_JT_BOOLEAN |
|
+ |
|
A_JT_MODULO |
|
* |
|
0 |
|
A_JT_TRUE |
|
= |
|
A_JT_BOOLEAN |
|
+ |
|
A_JT_MODULO |
|
* |
|
1 |
|
A_JT_NUMBER_FLOAT |
|
= |
|
A_JT_NUMBER |
|
+ |
|
A_JT_MODULO |
|
* |
|
0 |
|
A_JT_NUMBER_DOUBLE |
|
= |
|
A_JT_NUMBER |
|
+ |
|
A_JT_MODULO |
|
* |
|
1 |
|
A_JT_NUMBER_DECIMAL |
|
= |
|
A_JT_NUMBER |
|
+ |
|
A_JT_MODULO |
|
* |
|
2 |
|
A_JT_MULTIPLE |
|
= |
|
-1 |
assemble_json_object_member_get_first
AJsonMember *assemble_json_object_member_get_first(AJsonValue *value);
Description: Returns the first member of a value of type A_JT_OBJECTassemble_json_object_member_get_next
AJsonMember *assemble_json_object_member_get_next(AJsonMember *object);
Description: Returns the next m ember of a object of A_JT_OBJECT following "object". Will return NULL if its the last member.assemble_json_object_member_get_name
char *assemble_json_object_member_get_name(AJsonMember *object);
Description: Returns the name of a member.assemble_json_object_member_get_value
AJsonValue *assemble_json_object_member_get_value(AJsonMember *object);
Description: returns the value of a member.assemble_json_object_member_search_name_get_member
AJsonMember *assemble_json_object_member_search_name_get_member(AJsonValue *value, char *name, uint type);
Description: Searches a value of type A_JT_OBJECT for the first member of name "name" and type "type". If type is set to -1, assemble_json_object_member_search_name_get_member will return any member with a matching name. The function returns a pointer to the member or NULL if no matching member is found.assemble_json_object_member_search_name_get_value
AJsonValue *assemble_json_object_member_search_name_get_value(AJsonValue *value, char *name, uint type);
Description: Searches a value of type A_JT_OBJECT for the first member of name "name" and type "type". If type is set to -1, assemble_json_object_member_search_name_get_member will return any value with a matching name. The function returns a pointer to the value or NULL if no matching member is found.assemble_json_object_member_search_name_detach_value
AJsonValue *assemble_json_object_member_search_name_detach_value(AJsonValue *value, char *name, uint type);
Description: Searches a value of type A_JT_OBJECT for the first member of name "name" and type "type". If type is set to -1, assemble_json_object_member_search_name_get_member will return any value with a matching name. If a matching value is found it is detached from the object and a pointer to the value is returned. NULL is returned if no matching member is found.assemble_json_object_member_search_name_delete_value
int assemble_json_object_member_search_name_delete_value(AJsonValue *value, char *name, uint type);
Description: Searches a value of type A_JT_OBJECT for the first member of name "name" and type "type". If type is set to -1, assemble_json_object_member_search_name_delete_value will delete any value with a matching name. If a matching value is found it is deleted from the object and TRUE returned. FALSE is returned if no matching member is found.