本文整理了Java中net.minidev.json.JSONObject.isEmpty()
方法的一些代码示例,展示了JSONObject.isEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONObject.isEmpty()
方法的具体详情如下:
包路径:net.minidev.json.JSONObject
类名称:JSONObject
方法名:isEmpty
暂无
代码示例来源:origin: com.nimbusds/infinispan-sql-cache-store
/**
* Returns the string representation of the specified JSON object.
*
* @param jsonObject The JSON object, {@code null} if not specified.
*
* @return The JSON object string representation, {@code null} if not
* specified.
*/
public static String toSQLString(final JSONObject jsonObject) {
if (jsonObject == null || jsonObject.isEmpty()) {
return null;
}
return jsonObject.toJSONString();
}
代码示例来源:origin: com.nimbusds/infinispan-cachestore-sql
/**
* Returns the string representation of the specified JSON object.
*
* @param jsonObject The JSON object, {@code null} if not specified.
*
* @return The JSON object string representation, {@code null} if not
* specified.
*/
public static String toSQLString(final JSONObject jsonObject) {
if (jsonObject == null || jsonObject.isEmpty()) {
return null;
}
return jsonObject.toJSONString();
}
代码示例来源:origin: CloudSlang/cs-actions
private String generateResultingJsonString(char wrappingQuote, Map<String, Object> jsonMap) {
JSONObject jsonObject = new JSONObject(jsonMap);
String newJson = jsonObject.toJSONString(JSONStyle.LT_COMPRESS);
if ((!jsonObject.isEmpty()) && (newJson.charAt(1) != wrappingQuote)) {
return replaceUnescapedOccurrencesOfCharacterInText(newJson, newJson.charAt(1), wrappingQuote);
}
return newJson;
}
代码示例来源:origin: NemProject/nem.core
private <T> T deserializeObject(final JSONObject object, final ObjectDeserializer<T> activator) {
final JsonDeserializer deserializer = new JsonDeserializer(object, this.getContext());
return object.isEmpty() ? null : activator.deserialize(deserializer);
}
代码示例来源:origin: org.talend.daikon/logging-event-layout
LayoutUtils.addMDC(mdc, userFieldsEvent, logstashEvent);
if (!userFieldsEvent.isEmpty()) {
logstashEvent.put(LayoutFields.CUSTOM_INFO, userFieldsEvent);
代码示例来源:origin: org.talend.daikon/logging-event-layout
LayoutUtils.addMDC(mdc, userFieldsEvent, logstashEvent);
if (!userFieldsEvent.isEmpty()) {
logstashEvent.put(LayoutFields.CUSTOM_INFO, userFieldsEvent);
代码示例来源:origin: org.talend.daikon/logging-event-layout
LayoutUtils.addMDC(mdc, userFieldsEvent, logstashEvent);
if (!userFieldsEvent.isEmpty()) {
logstashEvent.put(LayoutFields.CUSTOM_INFO, userFieldsEvent);
内容来源于网络,如有侵权,请联系作者删除!