yyjson_mut_obj_rename_key

Function yyjson_mut_obj_rename_key 

Source
pub unsafe extern "C" fn yyjson_mut_obj_rename_key(
    doc: *mut yyjson_mut_doc,
    obj: *mut yyjson_mut_val,
    key: *const c_char,
    new_key: *const c_char,
) -> bool
Expand description

Replaces all matching keys with the new key. Returns true if at least one key was renamed. The key and new_key should be a null-terminated UTF-8 string. The new_key is copied and held by doc.

@warning This function takes a linear search time. If new_key already exists, it will cause duplicate keys.