-
Notifications
You must be signed in to change notification settings - Fork 45
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
Automatically convert between underscores and camelCase #31
Comments
I'll check it out, if it doesn't bring the performance down will add it. Otherwise you could simply write a category to NSDictionary that loops through all keys and changes them to camel case before passing it to OCMapper, should be quite easy and straight forward |
That's definitely an option, but since the underscore syntax is pretty common in APIs it seemed worth adding to the library. Thanks for looking into it! |
#31 Support underscore mapping (ex: first_name to firstName)
This is now available on 2.1, great suggestion. Thanks |
Works great. Thanks for adding it! 🍺 |
I often have to interact with APIs that use underscores in their JSON responses (e.g. 'some_property'). This forces me to do a lot of manual mapping to convert to ObjC/Swift camel case properties (e.g. 'someProperty). It would be fantastic if OCMapper could automatically convert between the two.
The text was updated successfully, but these errors were encountered: