I have a recursive struct that I'm reading writing to an external system.
serialization / deserialization is done using serde, currently everything is derived like so:
#[derive(Serialize, Deserialize)]
struct Foo {
bar: u64,
baz: Vec<Foo>,
}
because the nesting can get very deep i would like to implement my own deserialization that avoids recursion and instead works iteratively.
I'm finding it hard to actually implement this using serdes visitor pattern however.
are there any examples of similar implementations or someone who could point me in the right direction?