We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey, I would like to apply the same formatting to all json responses: camelCase, timeFormat and no empty options. Example:
#[derive(Serialize)] #[serde(rename_all = "camelCase")] struct Person { pub first_name: String, #[serde(skip_serializing_if = "Option::is_none")] pub bio: Option<String>, #[serde(with = "my_date_format")] pub birthday: DateTime<Utc>, }
Is there an option to do it globally for all serialized structs?
I tried implementing a custom serializer like in #833 and https://serde.rs/impl-serializer.html, but could not find a way to apply the conditions.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey, I would like to apply the same formatting to all json responses: camelCase, timeFormat and no empty options. Example:
Is there an option to do it globally for all serialized structs?
I tried implementing a custom serializer like in #833 and https://serde.rs/impl-serializer.html, but could not find a way to apply the conditions.
The text was updated successfully, but these errors were encountered: