struct Foo; があるときに serde_json で Option<Foo> を serialize すると null になるの辛い
#[serde(skip_serializing_if = "Option::is_none")] で省略できなかったでしたっけ https://serde.rs/field-attrs.html#skip_serializing_if …
-
-
ライブラリ側実装の都合で、残念ながらそれではだめそうです。 struct Foo; 側の Serialize/Deserialize を手動で実装することにしました。。。
-
あぁなるほど…(確かにこれだとフィールド単位でしか制御できない)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.