The Petgraph documentation hints at Serde support. Under "current features":
serde-1 - Defaults off. Enables serialization for Graph, StableGraph using serde 1.0. May require a more recent version of Rust than petgraph alone.
I can see the file serde_utils.rs
in the source, but I've found no examples showing how to get Serde support working.
I'm aware of how to enable an optional crate feature. My question is aimed at getting serialization and deserialization to work.
Here is an example:
All you need is in the documentation.