# Serde

Serde (**Ser**ialize and **De**serialize) is a library to serialize and deserialize data to or from a struct. This is usually used with language based crates like **serde\_json** for JSON or **serde\_yaml** for YAML.

To use it, install it, and then you can use the derives on your structs.

```bash
cargo add serde --features derives
cargo add serde_json
```

```rust
#[derive(Serialize, Deserialize)]
struct MyData {
  name: String,
  #[serde(rename = "invoiceAddress")]
  invoice_address: InvoiceAddress,
  #[serde(skip)]
  do_not_serialize: bool,
}
```