Skip to content

Commit f039d16

Browse files
committed
Minor Javadoc improvements to JsonNode wrt findValue() and related methods
1 parent 86f27a5 commit f039d16

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/java/com/fasterxml/jackson/databind/JsonNode.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,9 +1044,12 @@ public Set<Map.Entry<String, JsonNode>> properties() {
10441044
*/
10451045

10461046
/**
1047-
* Method for finding a JSON Object field with specified name in this
1047+
* Method for finding the first JSON Object field with specified name in this
10481048
* node or its child nodes, and returning value it has.
10491049
* If no matching field is found in this node or its descendants, returns null.
1050+
*<p>
1051+
* Note that traversal is done in document order (that is, order in which
1052+
* nodes are iterated if using {@link JsonNode#elements()})
10501053
*
10511054
* @param fieldName Name of field to look for
10521055
*
@@ -1055,8 +1058,10 @@ public Set<Map.Entry<String, JsonNode>> properties() {
10551058
public abstract JsonNode findValue(String fieldName);
10561059

10571060
/**
1058-
* Method for finding JSON Object fields with specified name, and returning
1059-
* found ones as a List. Note that sub-tree search ends if a field is found,
1061+
* Method for finding JSON Object fields with specified name -- both immediate
1062+
* child values and descendants -- and returning
1063+
* found ones as a {@link List}.
1064+
* Note that sub-tree search ends when matching field is found,
10601065
* so possible children of result nodes are <b>not</b> included.
10611066
* If no matching fields are found in this node or its descendants, returns
10621067
* an empty List.

0 commit comments

Comments
 (0)