MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / json_scalar_to_string

Function json_scalar_to_string

nodedb/src/engine/document/store/extract.rs:77–84  ·  view source on GitHub ↗
(val: &serde_json::Value)

Source from the content-addressed store, hash-verified

75}
76
77fn json_scalar_to_string(val: &serde_json::Value) -> Option<String> {
78 match val {
79 serde_json::Value::String(s) => Some(s.clone()),
80 serde_json::Value::Number(n) => Some(n.to_string()),
81 serde_json::Value::Bool(b) => Some(b.to_string()),
82 _ => None,
83 }
84}
85
86fn rmpv_scalar_to_string(val: &rmpv::Value) -> Option<String> {
87 match val {

Callers 1

extract_index_valuesFunction · 0.85

Calls 2

to_stringMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected