0PricingLogin
Learn Rust Coding · Lesson

Serialize and Deserialize

Derive macros.

What is Serde?

Serde (SERialize/DEserialize) is Rust's framework for converting data structures to and from formats like JSON, YAML, and more.

  • Format-agnostic core plus format crates
  • Driven by derive macros

Adding serde

Add serde with the derive feature, plus a format crate like serde_json. This edits Cargo.toml.

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"

All lessons in this course

  1. Serialize and Deserialize
  2. Working with JSON
  3. Custom Serialization
  4. Other Formats
← Back to Learn Rust Coding