yyjson_mut_val_write_fp

Function yyjson_mut_val_write_fp 

Source
pub unsafe extern "C" fn yyjson_mut_val_write_fp(
    fp: *mut FILE,
    val: *const yyjson_mut_val,
    flg: yyjson_write_flag,
    alc: *const yyjson_alc,
    err: *mut yyjson_write_err,
) -> bool
Expand description

Write a value to JSON file with options.

@param fp The file pointer. The data will be written to the current position of the file. If this path is NULL or invalid, the function will fail and return false. @param val The mutable JSON root value. If this parameter is NULL, the function will fail and return NULL. @param flg The JSON write options. Multiple options can be combined with | operator. 0 means no options. @param alc The memory allocator used by JSON writer. Pass NULL to use the libc’s default allocator. @param err A pointer to receive error information. Pass NULL if you don’t need error information. @return true if successful, false if an error occurs.

@warning On 32-bit operating system, files larger than 2GB may fail to write.