yyjson_val_write

Function yyjson_val_write 

Source
pub unsafe extern "C" fn yyjson_val_write(
    val: *const yyjson_val,
    flg: yyjson_write_flag,
    len: *mut usize,
) -> *mut c_char
Expand description

Write a value to JSON string.

This function is thread-safe.

@param val The 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 len A pointer to receive output length in bytes (not including the null-terminator). Pass NULL if you don’t need length information. @return A new JSON string, or NULL if an error occurs. This string is encoded as UTF-8 with a null-terminator. When it’s no longer needed, it should be freed with free().