glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL
https://app.quicktype.io
Apache License 2.0
12.12k stars 1.06k forks source link

feat(Rust): Add option to skip serializing empty optional fields #2397

Closed gudjonragnar closed 7 months ago

gudjonragnar commented 1 year ago

Adds an option --skip-serializing-none for Rust. With the option on, it will instruct serde to skip serializing the optional fields if they are empty (None).

Can reduce the size and noisiness of the json output for large structs with many optional fields.