Skip to main content

JsonSerialize

Derive Macro JsonSerialize 

Source
#[derive(JsonSerialize)]
{
    // Attributes available to this derive:
    #[json]
}
Expand description

Derive macro for JSON serialization

§Example

#[derive(JsonSerialize)]
struct Person {
    name: String,
    age: u32,
}