-
Notifications
You must be signed in to change notification settings - Fork 154
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
Fixes bug in string case serialization not taking numbers into account #420
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can run into issues with this when having fields named a_1_1 vs a_11 - both will have the same name in Camel. I think underscores should be replaced by any a-Z char instead OR you should check if camel will produce duplicate fields when applied, and runtime fail the serialisation.
imo, I think adding arbitrary chars is worse than underscores as it may also cause collisions with the original name. Then I think it is a better to raise an exception. Also, it is possible to provide custom field names in the metadata to manually avoid the conflicts. |
Agreed :) |
@matt035343 any chance you have time to add exception in case duplicate is produced and we merge? :) |
… string-case-number-bug-fix
… string-case-number-bug-fix
Exception is now added, please take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
As described in #376, the camelCase serialization does not remove underscores in front of numbers. I believe it should - let me know what you think.