Skip to main content

obj

Function obj 

Source
pub fn obj<I>(pairs: I) -> Value
where I: IntoIterator<Item = (&'static str, Value)>,
Expand description

Build a JSON object from an ordered list of (key, value) pairs.

Drop-in replacement for serde_json::json!({ "k": v, ... }) where every key is a literal.