MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / main

Function main

1d_json/rust/json/src/main.rs:4–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2use serde_json::json;
3
4fn main() {
5 let o_json = r#"["foo", {"bar": ["baz", null, 1.0, 2]}]"#;
6 let o: serde_json::Value = serde_json::from_str(&o_json).unwrap();
7 println!("{:?}", &o);
8
9 let o = json!(["foo", {"bar": ("baz", None:Option<i32>, 1.0, 2)}]);
10 println!("{:?}", &o);
11
12 let s = &o.to_string();
13 println!("{}", &s);
14}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected