# Creating JSON Use `serde_json`. But there are many other JSON crates. See [docs for serde_json](https://docs.rs/serde_json/latest/serde_json/). ```toml [dependencies] ... serde = { version = "1", features = [ "derive" ] } serde_json = "1" ... ``` ```rust use serde::{Serialize}; #[derive(Debug,Serialize)] struct Flibble { hex: String, vision: String, potato: i32, people: f32 } fn makejson1() { let data = Flibble { hex: String::from("Hex"), vision: String::from("Vision"), potato: 42, people: 3.14, }; println!("{:?}",data); let json = serde_json::to_string(&data).unwrap(); println!("{}",json); } ```