[serde_json] Convert i32 to serde_json::Value

How do I get a serde_json::Value if I have an i32?

.into()

let n: i32 = 42;
let v: serde_json::Value = n.into();
2 Likes

Thanks

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.