net.minidev.json.JSONObject.isEmpty()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(171)

本文整理了Java中net.minidev.json.JSONObject.isEmpty()方法的一些代码示例,展示了JSONObject.isEmpty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONObject.isEmpty()方法的具体详情如下:
包路径:net.minidev.json.JSONObject
类名称:JSONObject
方法名:isEmpty

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);

相关文章