Skip to content

Commit 6fbc98e

Browse files
authored
Fix #4875: remove JsonNode.fields() (#4877)
1 parent 80f2c10 commit 6fbc98e

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

release-notes/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Versions: 3.x (for earlier see VERSION-2.x)
8686
#4840: Increase minimum Android SDK required to 34 for Jackson 3.0
8787
#4865: Add spliterator support in `JsonNode`
8888
(contributed by @pjfanning)
89+
#4875: Remove `JsonNode.fields()` from 3.0
8990
- Remove `MappingJsonFactory`
9091
- Add context parameter for `TypeSerializer` contextualization (`forProperty()`)
9192
- Default for `JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROES` changed to `false` for 3.0

src/main/java/tools/jackson/databind/JsonNode.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,30 +1059,14 @@ public Spliterator<JsonNode> valueSpliterator() {
10591059
return values().spliterator();
10601060
}
10611061

1062-
/**
1063-
* NOTE: This method is deprecated, use {@link #properties()} instead.
1064-
*
1065-
* @return Iterator that can be used to traverse all key/value pairs for
1066-
* object nodes; empty iterator (no contents) for other types
1067-
*
1068-
* @deprecated As of 2.19, replaced by {@link #properties()}
1069-
*/
1070-
@Deprecated // since 2.19
1071-
public Iterator<Map.Entry<String, JsonNode>> fields() {
1072-
return properties().iterator();
1073-
}
1074-
10751062
/**
10761063
* Accessor that will return properties of {@code ObjectNode}
10771064
* similar to how {@link Map#entrySet()} works;
10781065
* for other node types will return empty {@link java.util.Set}.
1079-
* Replacement for {@link JsonNode#fields()}.
10801066
*
10811067
* @return Set of properties, if this node is an {@code ObjectNode}
10821068
* ({@link JsonNode#isObject()} returns {@code true}); empty
10831069
* {@link java.util.Set} otherwise.
1084-
*
1085-
* @since 2.15
10861070
*/
10871071
public Set<Map.Entry<String, JsonNode>> properties() {
10881072
return Collections.emptySet();

0 commit comments

Comments
 (0)