Skip to content
New issue

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

Support serde rename and rename_all #20

Closed
mokurin000 opened this issue Feb 18, 2024 · 2 comments · Fixed by #24
Closed

Support serde rename and rename_all #20

mokurin000 opened this issue Feb 18, 2024 · 2 comments · Fixed by #24

Comments

@mokurin000
Copy link

mokurin000 commented Feb 18, 2024

#[derive(Deserialize, Serialize,TomlExample)]
#[serde(rename_all = "kebab-case")]
struct Foo {
    a_a: String,
    #[serde(rename = "bb")]
    b: String,
}

println!("{}", Foo::toml_example());

expected:

a-a = ""

bb = ""

actual output:

a_a = ""

b = ""
@mokurin000 mokurin000 changed the title [BUG] serde rename_all was ignored [BUG] serde rename/rename_all was ignored Feb 18, 2024
@yanganto
Copy link
Owner

It will be good to have a simple code snippet and make the issue much easier to understand.

@yanganto yanganto added unclear description The issue is unclear, such that it can not be defined as a bug, feature, or any known issue. and removed unclear description The issue is unclear, such that it can not be defined as a bug, feature, or any known issue. labels Feb 19, 2024
@yanganto yanganto changed the title [BUG] serde rename/rename_all was ignored Support serde rename and rename_all Feb 19, 2024
This was referenced Feb 19, 2024
@yanganto
Copy link
Owner

Hi @poly000
Everything is fixed, please use the latest version.
And I believe this project is worth to star from your end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants