FLJSON5_ToJSON

Function FLJSON5_ToJSON 

Source
pub unsafe extern "C" fn FLJSON5_ToJSON(
    json5: FLString,
    outErrorMessage: *mut FLStringResult,
    outErrorPos: *mut usize,
    outError: *mut FLError,
) -> FLStringResult
Expand description

Converts valid JSON5 https://json5.org to JSON. Among other things, it converts single quotes to double, adds missing quotes around dictionary keys, removes trailing commas, and removes comments. @note If given invalid JSON5, it will usually return an error, but may just ouput comparably invalid JSON, in which case the caller’s subsequent JSON parsing will detect the error. The types of errors it overlooks tend to be subtleties of string or number encoding. @param json5 The JSON5 to parse @param outErrorMessage On failure, the error message will be stored here (if not NULL.) As this is a \ref FLStringResult, you will be responsible for freeing it. @param outErrorPos On a parse error, the byte offset in the input where the error occurred will be stored here (if it’s not NULL.) @param outError On failure, the error code will be stored here (if it’s not NULL.) @return The converted JSON.