Skip to content

Conversation

@billcrook
Copy link

This is my first pull request, lemme know if I am not following unspoken customs :) Also, let me know if an alternate approach to the issue is desirable.

#38
-Updated CaseClassSerializer to respect the PropertyNamingStrategy if defined
-Added test case

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not all that familiar with the style conventions of this project, but I would write this as:

private def maybeTranslateName(
    config: SerializationConfig, member: AnnotatedMethod, name: String): String =
  Option(config.getPropertyNamingStrategy)
    .map(_.nameForGetterMethod(config, member, name)).getOrElse(name)

@gmethvin
Copy link

Thanks for submitting a fix for my issue. It seems like a reasonable solution to me.

@billcrook
Copy link
Author

Oh, I like that much better. I will update it now.

FasterXML#38
-Updated CaseClassSerializer to respect the PropertyNamingStrategy if defined
-Added test case
@billcrook
Copy link
Author

FYI, I amended the last commit and force pushed.

@gmethvin
Copy link

@christophercurrie What would it take to get this merged? This is a feature I'd really like to take advantage of.

christophercurrie added a commit that referenced this pull request Sep 26, 2012
Issue #38 - Honor PropertyNamingStrategy during serialization
@christophercurrie christophercurrie merged commit 5fa5e94 into FasterXML:master Sep 26, 2012
@christophercurrie
Copy link
Member

Thanks for the patch, and sorry it took me a while to review. I'll get a new build out with this (and some other pending fixes) in the next day or so.

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 this pull request may close these issues.

3 participants