本文整理了Java中org.json.JSONObject.isEmpty()
方法的一些代码示例,展示了JSONObject.isEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONObject.isEmpty()
方法的具体详情如下:
包路径:org.json.JSONObject
类名称:JSONObject
方法名:isEmpty
[英]Check if JSONObject is empty.
[中]
代码示例来源:origin: b3log/latke
/**
* Get an array of field names from a JSONObject.
*
* @param jo
* JSON object
* @return An array of field names, or null if there are no names.
*/
public static String[] getNames(JSONObject jo) {
if (jo.isEmpty()) {
return null;
}
return jo.keySet().toArray(new String[jo.length()]);
}
代码示例来源:origin: org.b3log/latke
/**
* Get an array of field names from a JSONObject.
*
* @param jo
* JSON object
* @return An array of field names, or null if there are no names.
*/
public static String[] getNames(JSONObject jo) {
if (jo.isEmpty()) {
return null;
}
return jo.keySet().toArray(new String[jo.length()]);
}
代码示例来源:origin: no.ssb.lds/linked-data-store-persistence-provider-api
if (node.isEmpty()) {
String path = parentPath.stream().collect(Collectors.joining("."));
leafNodesByPath.put(path, new FlattenedDocumentLeafNode(documentKey, path, FragmentType.EMPTY_OBJECT, null, fragmentCapacity));
内容来源于网络,如有侵权,请联系作者删除!