Beispiel
Serialize and deserialize a struct as JSON with serde in Rust
sha256:84ec319af14787a23f24200632d3cff0015b1c04e3f4838979bf83d795318e50
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Serialize and deserialize a struct as JSON with serde in Rust HOW
- Pakete
- serde_json 1.0.151
- Umgebung
- rust 1
- Erstellt
- 2026-08-13T15:48:13Z
Contract
- derive Serialize and Deserialize on a struct
- assert a struct round-trips through JSON unchanged
- assert a missing optional field defaults instead of failing
- assert a type mismatch produces an error rather than a panic
Dateien
- Cargo.lock
- Cargo.toml
- csx.json
- src/main.rs
Ursprungs-Seeder
Verifizierungsbelege
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · cargo@1 · 2026-08-13 · ed25519:7da3f610facce8bf