pub unsafe extern "C" fn yyjson_write(
doc: *const yyjson_doc,
flg: yyjson_write_flag,
len: *mut usize,
) -> *mut c_charExpand description
Write a document to JSON string.
This function is thread-safe.
@param doc The JSON document.
If this doc is NULL or has no root, the function will fail and return false.
@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().