MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / json_object

Function json_object

src/dashboard/util.rs:95–100  ·  view source on GitHub ↗

Unwraps the `Map` inside a `json!({…})` object literal so handlers can mutate payload keys directly instead of guarding `as_object_mut()` calls that cannot fail. Non-object input yields an empty map.

(value: Value)

Source from the content-addressed store, hash-verified

93/// mutate payload keys directly instead of guarding `as_object_mut()` calls
94/// that cannot fail. Non-object input yields an empty map.
95pub(crate) fn json_object(value: Value) -> Map<String, Value> {
96 match value {
97 Value::Object(map) => map,
98 _ => Map::new(),
99 }
100}
101
102/// Escapes `%`/`_`/`\` for a `LIKE ? ESCAPE '\'` pattern.
103pub(crate) fn like_pattern(query: &str) -> String {

Callers 6

overview_payloadFunction · 0.85
search_payloadFunction · 0.85
session_payloadFunction · 0.85
node_payloadFunction · 0.85
timeline_payloadFunction · 0.85
compression_payloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected