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

doc: Add note about JsonNode.elements() -> values() rename #4873

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

JooHyukKim
Copy link
Member

@JooHyukKim JooHyukKim commented Dec 30, 2024

Thought maybe we could help users to have a clue?
#4870

@JooHyukKim JooHyukKim changed the title doc: Add note about JsonNode.elements() -> values() rename doc: Add note about JsonNode.elements() -> values() rename in Jackson 3, IN Jackson 2 Dec 30, 2024
@JooHyukKim JooHyukKim changed the title doc: Add note about JsonNode.elements() -> values() rename in Jackson 3, IN Jackson 2 doc: Add note about JsonNode.elements() -> values() rename in Jackson 3, "IN" Jackson 2 Dec 30, 2024
@JooHyukKim JooHyukKim changed the title doc: Add note about JsonNode.elements() -> values() rename in Jackson 3, "IN" Jackson 2 doc: Add note about JsonNode.elements() -> values() rename Dec 30, 2024
@@ -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()}.
Copy link
Member Author

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

  1. @Deprecated elements()
  2. Add new values() method in 2.19 version

Copy link
Member

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).

Copy link
Member

@cowtowncoder cowtowncoder Dec 31, 2024

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.

Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense thanks!

@cowtowncoder cowtowncoder merged commit 91fbfa2 into FasterXML:2.19 Dec 31, 2024
8 checks passed
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.

2 participants