Feature snake_case to camelCase conversion option
See original GitHub issueI went through docs i couldn’t find anything that let me convert snake_case
to CamelCase using plainToClass
In many cases json returning from API’s are mostly snake_case but my classes contain CamelCase properties. it would be nice to have something like below.
Just a thought can be implement in @f
decorator as well to be able to covert in both plainToClass and classToPlain.
e.g const post = plainToClass(Post, postJson, {snakeToCamel: true});
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Convert Snake Case string to Camel Case in Java
Method 1: Using Traversal. The idea is to first capitalize the first letter of the string. Then convert the string to string builder....
Read more >javascript - How to convert snake case to camelcase in my app
camelCase () to generate a function that takes the 2nd param (the key ) instead of the 1st param (the value ). var...
Read more >Camel case vs. snake case: What's the difference?
Camel case and snake case are popular naming conventions, but they serve very different functions in languages such as Java and JavaScript.
Read more >Convert Strings into any Case • snakecase
The to_any_case() function basically enables you to convert any string into any case. ... In this case, another parsing option might be handy:....
Read more >Convert String to Different Case Styles ... - In Plain English
Conversion from string to different ways of word combination in JavaScript. · 1. Snake case · 2. Kebab case · 3. Camel case...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Constructor with
asName
is not a great replacement for your need. Better is to way for the weekend, then I think we figured something out.Naming strategy was implemented a long time ago. I’m going to close this, but feel free to reopen if anything else needs to be addressed.