We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c1535d commit a490ebdCopy full SHA for a490ebd
JSONObject.java
@@ -963,6 +963,24 @@ public int length() {
963
return this.map.size();
964
}
965
966
+ /**
967
+ * Check if JSONObject is empty.
968
+ *
969
+ * @return true if JSONObject is empty, otherwise false.
970
+ */
971
+ public boolean isEmpty() {
972
+ return map.isEmpty();
973
+ }
974
+
975
976
+ * Check if JSONObject is not empty.
977
978
+ * @return true if JSONObject is not empty, otherwise false.
979
980
+ public boolean isNotEmpty() {
981
+ return !map.isEmpty();
982
983
984
/**
985
* Produce a JSONArray containing the names of the elements of this
986
* JSONObject.
0 commit comments