json_string

Macro json_string 

Source
json_string!() { /* proc-macro */ }
Expand description

Simplify use of serde_json::to_string(&json!(…)).unwrap_or_default() to serialize data into a json string.

Example:

let json = json_string!({
    "name": "John",
    "age": 47
});