yyjson_mut_obj_put

Function yyjson_mut_obj_put 

Source
pub unsafe extern "C" fn yyjson_mut_obj_put(
    obj: *mut yyjson_mut_val,
    key: *mut yyjson_mut_val,
    val: *mut yyjson_mut_val,
) -> bool
Expand description

Sets a key-value pair at the end of the object. This function may remove all key-value pairs for the given key before add. @param obj The object to which the new key-value pair is to be added. @param key The key, should be a string which is created by yyjson_mut_str(), yyjson_mut_strn(), yyjson_mut_strcpy() or yyjson_mut_strncpy(). @param val The value to add to the object. If this value is null, the behavior is same as yyjson_mut_obj_remove(). @return Whether successful.