yyjson_mut_doc_imut_copy

Function yyjson_mut_doc_imut_copy 

Source
pub unsafe extern "C" fn yyjson_mut_doc_imut_copy(
    doc: *mut yyjson_mut_doc,
    alc: *const yyjson_alc,
) -> *mut yyjson_doc
Expand description

Copies and returns a new immutable document from input, returns NULL on error. This makes a deep-copy on the mutable document. The returned document should be freed with yyjson_doc_free(). @note mut_doc -> imut_doc. @warning This function is recursive and may cause a stack overflow if the object level is too deep.