Skip to main content

json

Function json 

Source
pub fn json<'a>(
    value: impl ToSQL<'a, SQLiteValue<'a>>,
) -> SQL<'a, SQLiteValue<'a>>
Expand description

Wraps value in json(..), which checks that it is valid JSON and returns it as minified JSON text.

ยงExamples

let expr = json(SQL::<SQLiteValue>::raw("metadata"));
assert_eq!(expr.sql(), "json (metadata)");