|
libcmutils 0.6.5
Multi-platform C99 utility library
|
JSON object. More...
Data Fields | |
| CMUTIL_Json | parent |
| CMUTIL_StringArray *(* | GetKeys )(const CMUTIL_JsonObject *jobj) |
| Get the keys of the JSON object. | |
| CMUTIL_Json *(* | Get )(const CMUTIL_JsonObject *jobj, const char *key) |
| Get the value associated with a key in the JSON object. | |
| int64_t(* | GetLong )(const CMUTIL_JsonObject *jobj, const char *key) |
| Get the long integer value associated with a key in the JSON object. | |
| double(* | GetDouble )(const CMUTIL_JsonObject *jobj, const char *key) |
| Get the double value associated with a key in the JSON object. | |
| const CMUTIL_String *(* | GetString )(const CMUTIL_JsonObject *jobj, const char *key) |
| Get the string value associated with a key in the JSON object. | |
| const char *(* | GetCString )(const CMUTIL_JsonObject *jobj, const char *key) |
| Get the C-style string value associated with a key in the JSON object. | |
| CMBool(* | GetBoolean )(const CMUTIL_JsonObject *jobj, const char *key) |
| Get the boolean value associated with a key in the JSON object. | |
| void(* | Put )(CMUTIL_JsonObject *jobj, const char *key, CMUTIL_Json *json) |
| Put a JSON object into the JSON object with a key. | |
| void(* | PutLong )(CMUTIL_JsonObject *jobj, const char *key, int64_t value) |
| Put a long integer value into the JSON object with a key. | |
| void(* | PutDouble )(CMUTIL_JsonObject *jobj, const char *key, double value) |
| Put a double value into the JSON object with a key. | |
| void(* | PutString )(CMUTIL_JsonObject *jobj, const char *key, const char *value) |
| Put a string value into the JSON object with a key. | |
| void(* | PutBoolean )(CMUTIL_JsonObject *jobj, const char *key, CMBool value) |
| Put a boolean value into the JSON object with a key. | |
| void(* | PutNull )(CMUTIL_JsonObject *jobj, const char *key) |
| Put a null value into the JSON object with a key. | |
| CMUTIL_Json *(* | Remove )(CMUTIL_JsonObject *jobj, const char *key) |
| Remove a key-value pair from the JSON object. | |
| void(* | Delete )(CMUTIL_JsonObject *jobj, const char *key) |
| Delete a key-value pair from the JSON object. | |
JSON object.
Must be destroyed with CMUTIL_JsonDestroy.
| CMUTIL_Json CMUTIL_JsonObject::parent |
JSON base object.
| CMUTIL_StringArray *(* CMUTIL_JsonObject::GetKeys) (const CMUTIL_JsonObject *jobj) |
Get the keys of the JSON object.
This method retrieves the keys of the JSON object as a string array. The caller must destroy the returned CMUTIL_StringArray after use.
| jobj | The JSON object to get the keys from. |
| CMUTIL_Json *(* CMUTIL_JsonObject::Get) (const CMUTIL_JsonObject *jobj, const char *key) |
Get the value associated with a key in the JSON object.
This method retrieves the value associated with the specified key in the JSON object.
| jobj | The JSON object to get the value from. |
| key | The key whose associated value is to be retrieved. |
| int64_t(* CMUTIL_JsonObject::GetLong) (const CMUTIL_JsonObject *jobj, const char *key) |
Get the long integer value associated with a key in the JSON object.
This method retrieves the long integer value associated with the specified key in the JSON object.
| jobj | The JSON object to get the long integer from. |
| key | The key whose associated long integer value is to be retrieved. |
| double(* CMUTIL_JsonObject::GetDouble) (const CMUTIL_JsonObject *jobj, const char *key) |
Get the double value associated with a key in the JSON object.
This method retrieves the double value associated with the specified key in the JSON object.
| jobj | The JSON object to get the double from. |
| key | The key whose associated double value is to be retrieved. |
| const CMUTIL_String *(* CMUTIL_JsonObject::GetString) (const CMUTIL_JsonObject *jobj, const char *key) |
Get the string value associated with a key in the JSON object.
This method retrieves the string value associated with the specified key in the JSON object.
| jobj | The JSON object to get the string from. |
| key | The key whose associated string value is to be retrieved. |
| const char *(* CMUTIL_JsonObject::GetCString) (const CMUTIL_JsonObject *jobj, const char *key) |
Get the C-style string value associated with a key in the JSON object.
This method retrieves the C-style string value associated with the specified key in the JSON object.
| jobj | The JSON object to get the C-style string from. |
| key | The key whose associated C-style string value is to be retrieved. |
| CMBool(* CMUTIL_JsonObject::GetBoolean) (const CMUTIL_JsonObject *jobj, const char *key) |
Get the boolean value associated with a key in the JSON object.
This method retrieves the boolean value associated with the specified key in the JSON object.
| jobj | The JSON object to get the boolean value from. |
| key | The key whose associated boolean value is to be retrieved. |
| void(* CMUTIL_JsonObject::Put) (CMUTIL_JsonObject *jobj, const char *key, CMUTIL_Json *json) |
Put a JSON object into the JSON object with a key.
This method adds or updates a JSON object with the specified key in the JSON object. If the key already exists, the existing value is replaced.
| jobj | The JSON object to put the JSON value into. |
| key | The key to associate with the JSON value. |
| json | The JSON value to be put. |
| void(* CMUTIL_JsonObject::PutLong) (CMUTIL_JsonObject *jobj, const char *key, int64_t value) |
Put a long integer value into the JSON object with a key.
This method adds or updates a long integer value with the specified key in the JSON object. If the key already exists, the existing value is replaced.
| jobj | The JSON object to put the long integer value into. |
| key | The key to associate with the long integer value. |
| value | The long integer value to be put. |
| void(* CMUTIL_JsonObject::PutDouble) (CMUTIL_JsonObject *jobj, const char *key, double value) |
Put a double value into the JSON object with a key.
This method adds or updates a double value with the specified key in the JSON object. If the key already exists, the existing value is replaced.
| jobj | The JSON object to put the double value into. |
| key | The key to associate with the double value. |
| value | The double value to be put. |
| void(* CMUTIL_JsonObject::PutString) (CMUTIL_JsonObject *jobj, const char *key, const char *value) |
Put a string value into the JSON object with a key.
This method adds or updates a string value with the specified key in the JSON object. If the key already exists, the existing value is replaced.
| jobj | The JSON object to put the string value into. |
| key | The key to associate with the string value. |
| value | The string value to be put. |
| void(* CMUTIL_JsonObject::PutBoolean) (CMUTIL_JsonObject *jobj, const char *key, CMBool value) |
Put a boolean value into the JSON object with a key.
This method adds or updates a boolean value with the specified key in the JSON object. If the key already exists, the existing value is replaced.
| jobj | The JSON object to put the boolean value into. |
| key | The key to associate with the boolean value. |
| value | The boolean value to be put. |
| void(* CMUTIL_JsonObject::PutNull) (CMUTIL_JsonObject *jobj, const char *key) |
Put a null value into the JSON object with a key.
This method adds or updates a null value with the specified key in the JSON object. If the key already exists, the existing value is replaced.
| jobj | The JSON object to put the null value into. |
| key | The key to associate with the null value. |
| CMUTIL_Json *(* CMUTIL_JsonObject::Remove) (CMUTIL_JsonObject *jobj, const char *key) |
Remove a key-value pair from the JSON object.
This method removes the key-value pair associated with the specified key from the JSON object. If the key does not exist, no action is taken. Ownership of the removed JSON value is transferred to the caller.
| jobj | The JSON object to remove the key-value pair from. |
| key | The key to remove. |
| void(* CMUTIL_JsonObject::Delete) (CMUTIL_JsonObject *jobj, const char *key) |
Delete a key-value pair from the JSON object.
This method deletes the key-value pair associated with the specified key from the JSON object. If the key does not exist, no action is taken.
| jobj | The JSON object to delete the key-value pair from. |
| key | The key to delete. |