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

JsonIgnore fails if field starts with capital letter #1965

Open
leomayer opened this issue Nov 29, 2018 · 2 comments
Open

JsonIgnore fails if field starts with capital letter #1965

leomayer opened this issue Nov 29, 2018 · 2 comments

Comments

@leomayer
Copy link

I have a field annoted as:

@JsonIgnore
private boolean Field2BeIgnored;

After long search I figured out that the automatic method generation seems to be have problems with case sensitivity. I guess that starting a field with a capital letter generates a method by default by fails to match the according annotations due to mismatch of spelling.
Starting the field with a lower letter @JsonIgnore works as expected.

@Maaartinus
Copy link
Contributor

There's no @JsonIgnore in Lombok and there's nothing Lombok-related in your code. No idea, what method name would Lombok choose for your Field2BeIgnored, but you can bet, you'd get problems with most tools which rely on naming conventions, when you're violating them.

@leomayer
Copy link
Author

leomayer commented Jun 4, 2019

Although this was quickly refused, I wonder if this isn't much similar with #1981. I think the issue is quite similar but property little bit different. Anyway is there a chance this gets fixed as well?

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

No branches or pull requests

2 participants