yyjson_mut_obj_insert

Function yyjson_mut_obj_insert 

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

Inserts a key-value pair to the object at the given position. This function allows duplicated key in one object. @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. @param idx The index to which to insert the new pair. @return Whether successful.