yyjson_mut_obj_with_str

Function yyjson_mut_obj_with_str 

Source
pub unsafe extern "C" fn yyjson_mut_obj_with_str(
    doc: *mut yyjson_mut_doc,
    keys: *mut *const c_char,
    vals: *mut *const c_char,
    count: usize,
) -> *mut yyjson_mut_val
Expand description

Creates and returns a mutable object with keys and values, 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 *keys[2] = { “id”, “name” }; const char *vals[2] = { “01”, “Harry” }; yyjson_mut_val *obj = yyjson_mut_obj_with_str(doc, keys, vals, 2); @endcode