-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
(note: part of https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-3)
Currently there is just one shared removal method for ArrayNode
, ObjectNode
, declared in ContainerNode
:
public abstract T removeAll();
So let's add some more:
T removeIf(Predicate<? super JsonNode>)
T removeNulls()
: (short-cut for removeIf(JsonNode::isNull))
We could also consider clear()
(similar to Collection
), however, given there is already removeAll()
let's not add that.
Also considered but not yet added:
T removeEmpty()
: (short-cut for removeIf(JsonNode::isEmpty))
Metadata
Metadata
Assignees
Labels
No labels