Trait chatgpt_functions::escape_json::EscapeJson
source · pub trait EscapeJson {
// Required method
fn escape_json(&self) -> String;
}Expand description
Escape a string for JSON.
This is useful to escape the content of a message, for example. Withouht escaping, the JSON would be invalid and the API would return an error.