-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
doc: Add note about JsonNode.elements()
-> values()
rename
#4873
Conversation
JsonNode.elements()
-> values()
renameJsonNode.elements()
-> values()
rename in Jackson 3, IN Jackson 2
JsonNode.elements()
-> values()
rename in Jackson 3, IN Jackson 2JsonNode.elements()
-> values()
rename in Jackson 3, "IN" Jackson 2
JsonNode.elements()
-> values()
rename in Jackson 3, "IN" Jackson 2JsonNode.elements()
-> values()
rename
@@ -1071,6 +1071,8 @@ public boolean hasNonNull(int index) { | |||
* this node is a JSON Array or Object node. In case of Object node, | |||
* field names (keys) are not included, only values. | |||
* For other types of nodes, returns empty iterator. | |||
* <p> | |||
* Note: In Jackson 3, this method will be renamed to {@code values()}. |
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.
Either this.... or do both of below
@Deprecated
elements()- Add new
values()
method in 2.19 version
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.
I'll merge this, would accept PR for (2) too -- let's wait bit longer until doing (1) (like 2.20).
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.
Actually, one note: I will file another issue for changing return type of values()
to Collection<JsonNode>
, to align with other accessors (properties()
, propertyNames()
) -- easier to use than Iterator
.
This will mean that elements()
vs values()
is not a simple rename, although latter will still be replacement for former.
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.
@JooHyukKim Ok, I decided to revisit #4869, see changed description. So part is done for 2.19, rest for 3.0.
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.
Makes sense thanks!
Thought maybe we could help users to have a clue?
#4870