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

Add @JsonKey annotation. #179

Merged
merged 3 commits into from Nov 2, 2020
Merged

Conversation

Anusien
Copy link
Contributor

@Anusien Anusien commented Oct 26, 2020

This annotation will be used like @JsonValue but only when
serializing Map keys.

See jackson-databind/#2871

This annotation will be used like `@JsonValue` but only when
serializing Map keys.

See jackson-databind/#2871
@Anusien Anusien changed the base branch from master to 2.12 October 26, 2020 20:42
* Boolean argument is only used so that sub-classes can "disable"
* annotation if necessary.
*<p>
* NOTE: when use for Java <code>enum</code>s, one additional feature is
Copy link
Member

Choose a reason for hiding this comment

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

Probably needs to be removed for now

* to define mapping, but can not be done in general for POJO types; as such,
* this is not used for POJO deserialization.
*
* @see JsonCreator
Copy link
Member

Choose a reason for hiding this comment

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

Not sure @JsonCreator handling would be yet supported either.

@cowtowncoder
Copy link
Member

Aside from javadoc comments (which I can tweak too), looks good.

I don't think I have CLA yet from you? If so, it's here:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

and usual way is to print, fill & sign, scan/photo, email to info at fasterxml dot com.
Only needs to be done once, and after I get it works for all Jackson contributions. The only piece of process needed here fortunately. :)

@Anusien
Copy link
Contributor Author

Anusien commented Oct 28, 2020

Indeed's signed a corporate CLA, should be covered.

This stuff was copied from JsonValue and isn't correct here.
@cowtowncoder cowtowncoder merged commit 90dc316 into FasterXML:2.12 Nov 2, 2020
@cowtowncoder cowtowncoder changed the title Adds @JsonKey annotation. Add @JsonKey annotation. Nov 2, 2020
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.

None yet

2 participants