Kriskras99 commented on issue #365:
URL: https://github.com/apache/avro-rs/issues/365#issuecomment-3677742538

   I wrote a small program to test how Serde serializes enums: 
https://gist.github.com/Kriskras99/553e6a29777038359e24252df61fb959
   It prints the function name and arguments for every serialize function 
called.
   
   I think we can support mixed variants with `SchemaAwareSerializer` but not 
with `to_value`.
   And this isn't the only time where this is an issue with `to_value`, I think 
its function definition should be changed from `pub fn to_value<S: 
Serialize>(value: S) -> Result<Value, Error>` to `pub fn to_value<S: Serialize 
+ AvroSchema>(value: S) -> Result<Value, Error>` (and do the same with 
`from_value`). Without having a schema it's all guess work and very brittle.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to