Closed criminosis closed 7 months ago
Turns out my original PR missed one of the two cases 🤦♂️
called `Result::unwrap()` on an `Err` value: Error("invalid type: null, expected a string", line: 1, column: 76)
#[serde(default)] doesn't handle when the value is explicitly set to null like "message": null.
#[serde(default)]
"message": null
Without bringing in an additional dependency like serde_with this can be handled with a small additional deserializer.
I'll also add test cases like I should have in the first place to make sure this gets it this time @wolf4ood 👍
Turns out my original PR missed one of the two cases 🤦♂️
#[serde(default)]
doesn't handle when the value is explicitly set to null like"message": null
.Without bringing in an additional dependency like serde_with this can be handled with a small additional deserializer.
I'll also add test cases like I should have in the first place to make sure this gets it this time @wolf4ood 👍