JSON to Rust Struct (serde)

Generate Rust structs with serde Serialize/Deserialize derives from JSON. Nested objects become nested structs; snake_case fields get auto #[serde(rename = ...)] when the original key isn't snake_case. Add to your project after running cargo add serde --features derive and cargo add serde_json.

How to use the JSON to Rust Struct (serde)

Paste JSON. Output includes the serde imports at the top. Date strings become chrono::DateTime<chrono::Utc> — add chrono to Cargo.toml or change to String if you don't need date typing.