Can I generate nested models from JSON?
Yes. The generator supports nested objects and arrays and outputs corresponding nested model definitions.
Convert JSON to Rust models with nested structure support for fast code generation.
{
"id": 101,
"name": "Ada Lovelace",
"active": true,
"roles": ["admin", "editor"],
"profile": {
"email": "ada@example.com",
"score": 9.8
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct UserModel {
pub id: i64,
pub name: String,
pub active: bool,
pub roles: Vec<String>,
}
Yes. The generator supports nested objects and arrays and outputs corresponding nested model definitions.
Yes. Use the Force Optional toggle in the app toolbar when you need optional fields in the generated output.
Yes. Generated Rust structs are designed as serde-friendly model bases for JSON serialization workflows.