|
libcmutils 0.6.5
Multi-platform C99 utility library
|
JSON array type. More...
Data Fields | |
| CMUTIL_Json | parent |
| size_t(* | GetSize )(const CMUTIL_JsonArray *jarr) |
| Get the size of the JSON array. | |
| CMUTIL_Json *(* | Get )(const CMUTIL_JsonArray *jarr, uint32_t index) |
| Get a JSON value from the JSON array by index. | |
| int64_t(* | GetLong )(const CMUTIL_JsonArray *jarr, uint32_t index) |
| Get a long integer value from the JSON array by index. | |
| double(* | GetDouble )(const CMUTIL_JsonArray *jarr, uint32_t index) |
| Get a double value from the JSON array by index. | |
| const CMUTIL_String *(* | GetString )(const CMUTIL_JsonArray *jarr, uint32_t index) |
| Get a string value from the JSON array by index. | |
| const char *(* | GetCString )(const CMUTIL_JsonArray *jarr, uint32_t index) |
| Get a C-style string value from the JSON array by index. | |
| CMBool(* | GetBoolean )(const CMUTIL_JsonArray *jarr, uint32_t index) |
| Get a boolean value from the JSON array by index. | |
| void(* | Add )(CMUTIL_JsonArray *jarr, CMUTIL_Json *json) |
| Add a JSON value to the JSON array. | |
| void(* | AddLong )(CMUTIL_JsonArray *jarr, int64_t value) |
| Add a long integer value to the JSON array. | |
| void(* | AddDouble )(CMUTIL_JsonArray *jarr, double value) |
| Add a double value to the JSON array. | |
| void(* | AddString )(CMUTIL_JsonArray *jarr, const char *value) |
| Add a string value to the JSON array. | |
| void(* | AddBoolean )(CMUTIL_JsonArray *jarr, CMBool value) |
| Add a boolean value to the JSON array. | |
| void(* | AddNull )(CMUTIL_JsonArray *jarr) |
| Add a null value to the JSON array. | |
| CMUTIL_Json *(* | Remove )(CMUTIL_JsonArray *jarr, uint32_t index) |
| Remove a JSON value from the JSON array by index. | |
| void(* | Delete )(CMUTIL_JsonArray *jarr, uint32_t index) |
| Delete a JSON value from the JSON array by index. | |
JSON array type.
Must be destroyed with CMUTIL_JsonDestroy.
| CMUTIL_Json CMUTIL_JsonArray::parent |
JSON base object
| size_t(* CMUTIL_JsonArray::GetSize) (const CMUTIL_JsonArray *jarr) |
Get the size of the JSON array.
This method returns the number of elements in the JSON array.
| jarr | The JSON array to get the size from. |
| CMUTIL_Json *(* CMUTIL_JsonArray::Get) (const CMUTIL_JsonArray *jarr, uint32_t index) |
Get a JSON value from the JSON array by index.
This method retrieves the JSON value at the specified index in the JSON array.
| jarr | The JSON array to get the JSON value from. |
| index | The index of the JSON value to retrieve. |
| int64_t(* CMUTIL_JsonArray::GetLong) (const CMUTIL_JsonArray *jarr, uint32_t index) |
Get a long integer value from the JSON array by index.
This method retrieves the long integer value at the specified index in the JSON array.
| jarr | The JSON array to get the long integer value from. |
| index | The index of the long integer value to retrieve. |
| double(* CMUTIL_JsonArray::GetDouble) (const CMUTIL_JsonArray *jarr, uint32_t index) |
Get a double value from the JSON array by index.
This method retrieves the double value at the specified index in the JSON array.
| jarr | The JSON array to get the double value from. |
| index | The index of the double value to retrieve. |
| const CMUTIL_String *(* CMUTIL_JsonArray::GetString) (const CMUTIL_JsonArray *jarr, uint32_t index) |
Get a string value from the JSON array by index.
This method retrieves the string value at the specified index in the JSON array. Ownership of the returned string is not transferred to the caller.
| jarr | The JSON array to get the string value from. |
| index | The index of the string value to retrieve. |
| const char *(* CMUTIL_JsonArray::GetCString) (const CMUTIL_JsonArray *jarr, uint32_t index) |
Get a C-style string value from the JSON array by index.
This method retrieves the C-style string value at the specified index in the JSON array. Ownership of the returned string is not transferred to the caller.
| jarr | The JSON array to get the C-style string value from. |
| index | The index of the C-style string value to retrieve. |
| CMBool(* CMUTIL_JsonArray::GetBoolean) (const CMUTIL_JsonArray *jarr, uint32_t index) |
Get a boolean value from the JSON array by index.
This method retrieves the boolean value at the specified index in the JSON array.
| jarr | The JSON array to get the boolean value from. |
| index | The index of the boolean value to retrieve. |
| void(* CMUTIL_JsonArray::Add) (CMUTIL_JsonArray *jarr, CMUTIL_Json *json) |
Add a JSON value to the JSON array.
This method appends a JSON value to the end of the JSON array. Ownership of the JSON value is transferred to the JSON array.
| jarr | The JSON array to add the JSON value to. |
| json | The JSON value to add. |
| void(* CMUTIL_JsonArray::AddLong) (CMUTIL_JsonArray *jarr, int64_t value) |
Add a long integer value to the JSON array.
This method appends a long integer value to the end of the JSON array.
| jarr | The JSON array to add the long integer value to. |
| value | The long integer value to add. |
| void(* CMUTIL_JsonArray::AddDouble) (CMUTIL_JsonArray *jarr, double value) |
Add a double value to the JSON array.
This method appends a double value to the end of the JSON array.
| jarr | The JSON array to add the double value to. |
| value | The double value to add. |
| void(* CMUTIL_JsonArray::AddString) (CMUTIL_JsonArray *jarr, const char *value) |
Add a string value to the JSON array.
This method appends a string value to the end of the JSON array. Ownership of the string value is not transferred to the JSON array.
| jarr | The JSON array to add the string value to. |
| value | The string value to add. |
| void(* CMUTIL_JsonArray::AddBoolean) (CMUTIL_JsonArray *jarr, CMBool value) |
Add a boolean value to the JSON array.
This method appends a boolean value to the end of the JSON array.
| jarr | The JSON array to add the boolean value to. |
| value | The boolean value to add. |
| void(* CMUTIL_JsonArray::AddNull) (CMUTIL_JsonArray *jarr) |
Add a null value to the JSON array.
This method appends a null value to the end of the JSON array.
| jarr | The JSON array to add the null value to. |
| CMUTIL_Json *(* CMUTIL_JsonArray::Remove) (CMUTIL_JsonArray *jarr, uint32_t index) |
Remove a JSON value from the JSON array by index.
This method removes the JSON value at the specified index from the JSON array. Ownership of the removed JSON value is transferred to the caller.
| jarr | The JSON array to remove the JSON value from. |
| index | The index of the JSON value to remove. |
| void(* CMUTIL_JsonArray::Delete) (CMUTIL_JsonArray *jarr, uint32_t index) |
Delete a JSON value from the JSON array by index.
This method removes the JSON value at the specified index from the JSON array. Ownership of the removed JSON value is not transferred to the caller.
| jarr | The JSON array to delete the JSON value from. |
| index | The index of the JSON value to delete. |