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

   It did not work correctly in 0.21.0 (and before).
   If `serde_human_readable` was set to `true` it would allways output a string 
(even if the schema was bytes) and if it was set to `false` it would always 
output a bytes (not a fixed!):
   | human_readable | Uuid |
   | - | - |
   | `true` | `string` |
   | `false` | `bytes` |
   
   In 0.22.0 it will do the following:
   | human_readable | Uuid (String) | Uuid (Bytes) | Uuid (Fixed) |
   | - | - | - | - |
   | `true` | `string` | `Err` | `Err` |
   | `false` | `bytes`* | `bytes` | `fixed` | 
   
   \* This is a bug and will be fixed, it should be `Err`
   
   What you want is not possible. We don't get a `Uuid` from Serde. We get a 
string if `human_readable` is `true` (like 
`550e8400-e29b-41d4-a716-446655440000`) or we bytes when `human_readable` is 
`false` (like `[171, 27, 146, 24, 38, 212, 254, 206, 21, 172, 18, 139, 191, 
244, 27, 226]`). So we can't choose the input to match what the schema expects.


-- 
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