-
-
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
Add spliterator support in JsonNode
#4865
Conversation
* | ||
* @since 3.0 | ||
*/ | ||
public Spliterator<JsonNode> elementsSpliterator() { |
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.
Based on valueStream()
method, should probably be value(s?)Spliterator()
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.
+1 on valueSpliterator
.
* for object nodes; empty spliterator (no contents) for other types | ||
* @since 3.0 | ||
*/ | ||
public Spliterator<Map.Entry<String, JsonNode>> fieldsSpliterator() { |
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.
3.0 uses term "property" everywhere, all references to "field" are changed elsewhere, although looks like JsonNode
missed one such change.
I will need to remove method fields()
For the combination of property name and value, "entry" is used in JsonNode
, see entryStream()
.
So should be entrySpliterator()
?
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, let me think about this one: I may have chosen wrong term: instead "entry" should really use "property"/"properties, as per:
https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-6
will change entryStream
to propertyStream()
; and then we should have propertySpliterator
.
Or, if we are decide to go with plurals, propertiesSpliterator()
.
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.
Singular it is: will change to propertySpliterator()
. Similar for value case.
JsonNode
relates to FasterXML/jackson-core#1369