Closed cathaysia closed 1 month ago
I try 1.0.10, I report the same error.
Can you provide a minimal reproduction case that shows the issue? I am not entirely sure what you are trying to attempt from the code provided.
Here is a example to deserialzie Enum:
There are some interesting bugs clearly with the value deserializer. Basic testing shows that SimpleEnum::deserialize(&Value::from("B"))
succeeds but SimpleEnum::deserialize(Value::from("B"))
fails. I will get that fixed.
Description
I'm using Value::from_serialize pass context to template. Then using
ViaDeserialize<Type>
deserialize the value. however, it failed.here are some log:
here is my enum defination:
as far as I know, plain enum, unit struct cannot be deserialize. It seems enum would be serialized to &str?
Additional helpful information:
What did you expect
Serialization and deserialization operations should be symmetric