mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-30 11:50:38 +00:00
feat: json2 insert (#7981)
* feat: json2 insert Signed-off-by: luofucong <luofc@foxmail.com> * resolve PR comments Signed-off-by: luofucong <luofc@foxmail.com> * use main greptime-proto Signed-off-by: luofucong <luofc@foxmail.com> --------- Signed-off-by: luofucong <luofc@foxmail.com>
This commit is contained in:
@@ -919,6 +919,7 @@ pub fn encode_json_value(value: JsonValue) -> v1::JsonValue {
|
||||
.collect::<Vec<_>>();
|
||||
Some(json_value::Value::Object(JsonObject { entries }))
|
||||
}
|
||||
JsonVariant::Variant(x) => Some(json_value::Value::Variant(x)),
|
||||
};
|
||||
v1::JsonValue { value }
|
||||
}
|
||||
@@ -952,6 +953,7 @@ fn decode_json_value(value: &v1::JsonValue) -> JsonValueRef<'_> {
|
||||
})
|
||||
.collect::<BTreeMap<_, _>>()
|
||||
.into(),
|
||||
json_value::Value::Variant(x) => x.as_slice().into(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user