George Haidar @disintegrator.dev · Dec 28

I'm very new to Rust so pardon my ignorance but the solution I ended up with was to create my own take on serde_json::Value which had an additional member called Omit. This coupled with a custom Serialize trait impl means when I encounter Omit when serializing object/array members, I skip over them.

0 likes 2 replies

?

Replies

Chris Allen ☦︎ 希腊天主教 ☦️🇻🇦 · Dec 28

yeah that doesn't make any sense to me. I'm probably missing something here.

Jérôme Gravel-Niquet · Dec 28

Hmm, maybe `#[serde(skip_serialization)]` on the field would give you what you want?