I was seeing a confusing error deserailizing a list. It was extra strange because this was working in other places in my code. It seems that there is a weird edge case when parsing a sequence at the max depth value (only tested with Vec and max_depth=1).
The first two work. My theory is that the first works because the list parameter isn't the first parameter and that the second one works because it has max_depth=2. However the third crashes with the following error:
thread 't' panicked at 'called Result::unwrap() on an Err value: Custom("invalid type: map, expected a sequence")', src/lib.rs:11:87
I was seeing a confusing error deserailizing a list. It was extra strange because this was working in other places in my code. It seems that there is a weird edge case when parsing a sequence at the max depth value (only tested with
Vec
andmax_depth=1
).The first two work. My theory is that the first works because the
list
parameter isn't the first parameter and that the second one works because it hasmax_depth=2
. However the third crashes with the following error: