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 JsonNode.values() to replace elements() #4869

Closed
cowtowncoder opened this issue Dec 28, 2024 · 2 comments
Closed

Add JsonNode.values() to replace elements() #4869

cowtowncoder opened this issue Dec 28, 2024 · 2 comments
Labels
2.19 Issues planned at 2.19 or later 3.0 Issue planned for initial 3.0 release
Milestone

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented Dec 28, 2024

(see https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-6 for background)

So, JsonNode.elements() should be renamed as JsonNode.values() to align naming.
But to make eventual upgrading easier let's make changes to both 2.19 and 3.0 so that:

  1. For 2.19, add JsonNode.values() with same signature as JsonNode.elements() (return Iterator<JsonNode>), make new method call existing one
  2. For 2.20 we can consider Deprecating JsonNode.elements()
  3. For 3.0 change signature to Collection<JsonNode> values()
@cowtowncoder cowtowncoder added the 3.0 Issue planned for initial 3.0 release label Dec 28, 2024
@cowtowncoder
Copy link
Member Author

cowtowncoder commented Dec 28, 2024

Realized we probably should also change the return type, but one step at a time.

EDIT: will change return value in 3.0.

@cowtowncoder
Copy link
Member Author

cc @pjfanning Looks like Scala module has at least one usage to update in master.

@cowtowncoder cowtowncoder changed the title Rename JsonNode method elements() as values() to unify naming in 3.0 Rename JsonNode method elements() as values() to unify naming in 3.0; change return type Dec 31, 2024
@cowtowncoder cowtowncoder changed the title Rename JsonNode method elements() as values() to unify naming in 3.0; change return type Add JsonNode.values() to replace elements() Dec 31, 2024
@cowtowncoder cowtowncoder added the 2.19 Issues planned at 2.19 or later label Dec 31, 2024
@cowtowncoder cowtowncoder added this to the 2.19.0 milestone Dec 31, 2024
cowtowncoder added a commit that referenced this issue Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.19 Issues planned at 2.19 or later 3.0 Issue planned for initial 3.0 release
Projects
None yet
Development

No branches or pull requests

1 participant