You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An often-used idiom for checking for empty Arrays and Object for JsonNode is:
if (arrayNode.size() == 0) { // is empty
}
and due to common use, would make sense to allow use via alias
if (arrayNode.isEmpty()) { ...
}
Semantically it makes sense for containers (Arrays, Objects). For scalars, we could either always return true, or have per-type logic.
I think that former makes more sense at this point even though there may be some confusing in contrast to JsonSerializer.isEmpty() (which does implement much more complex logic).
The text was updated successfully, but these errors were encountered:
An often-used idiom for checking for empty Arrays and Object for
JsonNode
is:and due to common use, would make sense to allow use via alias
Semantically it makes sense for containers (Arrays, Objects). For scalars, we could either always return
true
, or have per-type logic.I think that former makes more sense at this point even though there may be some confusing in contrast to
JsonSerializer.isEmpty()
(which does implement much more complex logic).The text was updated successfully, but these errors were encountered: