Skip to main content

value_to_string

Function value_to_string 

Source
pub fn value_to_string(value: &Value) -> Result<String>
Expand description

Convert a JSON value to its string representation for use in SQL.

This is used for extracting key values before they are escaped and quoted.

§Examples

value_to_string(&json!("test")) // produces "test"
value_to_string(&json!(123)) // produces "123"