Repository navigation
Added JsonObject method isEmpty() - #2233
Conversation
Marcono1234
left a comment
There was a problem hiding this comment.
Thanks for this pull request!
Could you please for completeness sake also add a small test to JsonObjectTest?
Your argument about consistency with JsonArray.isEmpty() is reasonable, but on the other hand the question might be how many Map convenience methods we want to add, see also related #1667 (comment).
268cee7 to
ec19d71
Compare
I feel that Other |
ec19d71 to
90db072
Compare
|
Given that we already have both |
* Added isEmpty() * Fixed Javadoc typo * Changed test to use assertTrue() and assertFalse() (cherry picked from commit ceb3b87)
Code change
Added JsonObject method
isEmpty().Rationale
There are scenarios where there is a need to check whether a
JsonObjectcontains any key/value pairs.This mirrors the existing functionality of
JsonArray.isEmpty()