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
It would be useful to have a way to "inline" struct fields into the parent struct for the purpose of (de)serialization, like this:
#[derive(YaSerialize, YaDeserialize)] struct Common { a: i32, } #[derive(YaSerialize, YaDeserialize)] struct Foo { #[yaserde(flatten)] common: Common, foo: u8, } #[derive(YaSerialize, YaDeserialize)] struct Bar { #[yaserde(flatten)] common: Common, bar: u64, }
Like #[serde(flatten)]
#[serde(flatten)]
The text was updated successfully, but these errors were encountered:
I keep it in mind, but it's not my priority. If someone want to contribute, you are welcome !
Sorry, something went wrong.
8cc97f9
Hello @Boscop ,
@DmitrySamoylov has updated the project and supported flatten feature. Is it ok for you ? if yes, close the issue.
Sorry for the late reply, I get too many notifications.. Yes, it's great, thanks :)
No branches or pull requests
It would be useful to have a way to "inline" struct fields into the parent struct for the purpose of (de)serialization, like this:
Like
#[serde(flatten)]
The text was updated successfully, but these errors were encountered: