~The correct thing to do would be to make these fields Option<String> but I didn't do so in order not to break the api.~ Had to convert the fields to Option, which breaks the public API, but I doubt anyone is using the Owner struct tbh.
This is also how the go implementation does it too:
According to the docs
id
andname
are not required andemail
isn't even mentioned. My request hadid
andemail
as null, which broke deserialization~The correct thing to do would be to make these fields, which breaks the public API, but I doubt anyone is using the Owner struct tbh.
Option<String>
but I didn't do so in order not to break the api.~ Had to convert the fields to OptionThis is also how the go implementation does it too:
https://github.com/cloudflare/cloudflare-go/blob/325729d2e358cd3f300c130cfa828e5704e725d8/zone.go#L24-L29
If any of the fields are
null
, the go json library will just make that field an empty string.