Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

serialization

Turning a value into text or bytes to store or send it, and back again.

Serialization converts in-memory values to a data format (JSON, TOML, bytes) and deserialization parses them back; serde separates the data types (Serialize/Deserialize) from the formats (serde_json, toml...).

Loading interactive…

Examples

  • With #[derive(Serialize, Deserialize)], serde_json::to_string(&r)? writes {"sensor":"porch","celsius":21.5}, and serde_json::from_str::<Reading>(&text)? reads it back.

Read the full section →