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

Title Case #1724

Closed
gilescope opened this issue Jan 20, 2020 · 7 comments
Closed

Title Case #1724

gilescope opened this issue Jan 20, 2020 · 7 comments

Comments

@gilescope
Copy link

Am I the only one that has a case for "Human Case" where I could do with capitals and spaces in the RenameRule?

I'd suggest we close this and only implement it if it gets some thumbs up from others that also could do with this.

@gilescope
Copy link
Author

Closing unless anyone else needs it...

@gilescope
Copy link
Author

https://crates.io/crates/heck calls this "Title Case"

@treble37
Copy link

treble37 commented May 9, 2020

actually @gilescope - I could use this as well, I was dealing with some JSON that had Title Case / Human Case...any chance to reopen?

@gilescope gilescope reopened this May 9, 2020
@gilescope gilescope changed the title Human Case Title Case May 9, 2020
@gilescope
Copy link
Author

I’ve seen a few rust case libraries now and everyone definitely calls this “Title Case”.

t-mw added a commit to t-mw/serde that referenced this issue Jul 3, 2020
t-mw added a commit to t-mw/serde that referenced this issue Jul 3, 2020
t-mw added a commit to t-mw/serde that referenced this issue Jul 3, 2020
t-mw added a commit to t-mw/serde that referenced this issue Jul 3, 2020
@dtolnay
Copy link
Member

dtolnay commented Jul 4, 2020

For such less widespread case conventions, I would suggest building this as an attribute macro which inserts appropriate serde(rename = "...") attributes onto every field/variant in its input.

@dtolnay dtolnay closed this as completed Jul 4, 2020
@dzmitry-lahoda
Copy link

me too!

@dzmitry-lahoda
Copy link

it is very use full with yaml!!! so I can avoid scaring people with snakes and pascals and camels. and using same JSON stuff to render human yaml.

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

No branches or pull requests

4 participants