Skip to main content

json_object

Macro json_object 

Source
macro_rules! json_object {
    ($stuff:tt) => { ... };
}
Expand description

Helper macro with the same syntax as serde_json::json specialized for constructing JSON objects.

It will construct a more specific type (serde_json::Map<String,Value>) than just serde_json::Value when constructing an object, and panic if the syntax is valid JSON but not an object.