pub unsafe extern "C" fn yyjson_mut_obj_with_kv(
doc: *mut yyjson_mut_doc,
kv_pairs: *mut *const c_char,
pair_count: usize,
) -> *mut yyjson_mut_valExpand description
Creates and returns a mutable object with key-value pairs and pair count, returns NULL on error. The keys and values are not copied. The strings should be a null-terminated UTF-8 string.
@warning The input string is not copied, you should keep this string unmodified for the lifetime of this JSON document.
@par Example @code const char *kv_pairs[4] = { “id”, “01”, “name”, “Harry” }; yyjson_mut_val *obj = yyjson_mut_obj_with_kv(doc, kv_pairs, 2); @endcode