multisql/data/value/
serde_convert.rs

1use crate::{Cast, Value};
2
3impl From<Value> for serde_json::value::Value {
4	fn from(value: Value) -> serde_json::value::Value {
5		match value {
6			Value::Bool(value) => value.into(),
7			Value::U64(value) => value.into(),
8			Value::I64(value) => value.into(),
9			Value::F64(value) => value.into(),
10			Value::Str(value) => value.into(),
11			Value::Null => serde_json::value::Value::Null,
12			other => {
13				let string: String = other.cast().unwrap();
14				string.into()
15			}
16		}
17	}
18}