google-cloud-rs icon indicating copy to clipboard operation
google-cloud-rs copied to clipboard

Deserialize Bucket retention policy from String to u64

Open amuhle opened this issue 2 years ago • 0 comments

Currently when a bucket has retention policy enabled and we try to get the bucket it fails when deserializing it. Google Storage API is sending a String when a u64 is expected based on their documentation.

This PR creates a specific deserializer for u64 when a String or 64 is being sent. I tried to find an existing crate which already solves this but couldn't find anything. However, as this is pretty simple to solve I thought I would just add the code in a new module and if in the future there's a well maintained crate to solve this kind of issues, then it will be pretty straightforward to refactor.

amuhle avatar Apr 23 '22 11:04 amuhle