org.apache.shindig.common.JsonSerializer.appendMap()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(79)

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

JsonSerializer.appendMap介绍

[英]Appends a Map to the buffer.
[中]将映射附加到缓冲区。

代码示例

代码示例来源:origin: org.apache.shindig/shindig-common

/**
 * Appends a Map to the buffer.
 *
 * @throws IOException If {@link Appendable#append(char)} throws an exception.
 */
public static void appendMultimap(Appendable buf, Multimap<String, Object> map) throws IOException {
 appendMap(buf, map.asMap());
}

代码示例来源:origin: org.gatein.shindig/shindig-common

/**
 * Appends a Map to the buffer.
 *
 * @throws IOException If {@link Appendable#append(char)} throws an exception.
 */
public static void appendMultimap(Appendable buf, Multimap<String, Object> map) throws IOException {
 appendMap(buf, map.asMap());
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-common

/**
 * Appends a Map to the buffer.
 *
 * @throws IOException If {@link Appendable#append(char)} throws an exception.
 */
public static void appendMultimap(Appendable buf, Multimap<String, Object> map) throws IOException {
 appendMap(buf, map.asMap());
}

代码示例来源:origin: com.lmco.shindig/shindig-common

/**
 * Appends a Map to the buffer.
 *
 * @throws IOException If {@link Appendable#append(char)} throws an exception.
 */
public static void appendMultimap(Appendable buf, Multimap<String, Object> map) throws IOException {
 appendMap(buf, map.asMap());
}

代码示例来源:origin: apache/shindig

/**
 * Appends a Map to the buffer.
 *
 * @throws IOException If {@link Appendable#append(char)} throws an exception.
 */
public static void appendMultimap(Appendable buf, Multimap<String, Object> map) throws IOException {
 appendMap(buf, map.asMap());
}

代码示例来源:origin: org.apache.shindig/shindig-common

/**
 * Serializes a Map as a JSON object. Does not guard against cyclical references.
 */
public static String serialize(Map<String, ?> map) {
 StringBuilder buf = new StringBuilder(map.size() * BASE_MULTIPLIER);
 try {
  appendMap(buf, map);
 } catch (IOException e) {
  // Shouldn't ever happen unless someone adds something to append*.
  throw new RuntimeException(e);
 }
 return buf.toString();
}

代码示例来源:origin: com.lmco.shindig/shindig-common

/**
 * Serializes a Map as a JSON object. Does not guard against cyclical references.
 */
public static String serialize(Map<String, ?> map) {
 StringBuilder buf = new StringBuilder(map.size() * BASE_MULTIPLIER);
 try {
  appendMap(buf, map);
 } catch (IOException e) {
  // Shouldn't ever happen unless someone adds something to append*.
  throw new RuntimeException(e);
 }
 return buf.toString();
}

代码示例来源:origin: apache/shindig

/**
 * Serializes a Map as a JSON object. Does not guard against cyclical references.
 */
public static String serialize(Map<String, ?> map) {
 StringBuilder buf = new StringBuilder(map.size() * BASE_MULTIPLIER);
 try {
  appendMap(buf, map);
 } catch (IOException e) {
  // Shouldn't ever happen unless someone adds something to append*.
  throw new RuntimeException(e);
 }
 return buf.toString();
}

代码示例来源:origin: org.gatein.shindig/shindig-common

/**
 * Serializes a Map as a JSON object. Does not guard against cyclical references.
 */
public static String serialize(Map<String, ?> map) {
 StringBuilder buf = new StringBuilder(map.size() * BASE_MULTIPLIER);
 try {
  appendMap(buf, map);
 } catch (IOException e) {
  // Shouldn't ever happen unless someone adds something to append*.
  throw new RuntimeException(e);
 }
 return buf.toString();
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-common

/**
 * Serializes a Map as a JSON object. Does not guard against cyclical references.
 */
public static String serialize(Map<String, ?> map) {
 StringBuilder buf = new StringBuilder(map.size() * BASE_MULTIPLIER);
 try {
  appendMap(buf, map);
 } catch (IOException e) {
  // Shouldn't ever happen unless someone adds something to append*.
  throw new RuntimeException(e);
 }
 return buf.toString();
}

代码示例来源:origin: com.lmco.shindig/shindig-gadgets

/**
 * Generate the correctly parameterized Javascript call to swfobject
 */
String buildSwfObjectCall(SwfObjectConfig config, String altContentId) {
 try {
  StringBuilder builder = new StringBuilder();
  builder.append("swfobject.embedSWF(");
  JsonSerializer.appendString(builder, config.swf.toString());
  builder.append(",\"");
  builder.append(altContentId);
  builder.append("\",");
  JsonSerializer.appendString(builder, config.width);
  builder.append(',');
  JsonSerializer.appendString(builder, config.height);
  builder.append(",\"").append(flashMinVersion).append("\",");
  builder.append("null,null,");
  JsonSerializer.appendMap(builder, config.getParams());
  builder.append(',');
  JsonSerializer.appendMap(builder, config.getAttributes());
  builder.append(");");
  return builder.toString();
 } catch (IOException ioe) {
  // Should not happen
  throw new RuntimeException(ioe);
 }
}

代码示例来源:origin: org.apache.shindig/shindig-gadgets

/**
 * Generate the correctly parameterized Javascript call to swfobject
 */
String buildSwfObjectCall(SwfObjectConfig config, String altContentId) {
 try {
  StringBuilder builder = new StringBuilder();
  builder.append("swfobject.embedSWF(");
  JsonSerializer.appendString(builder, config.swf.toString());
  builder.append(",\"");
  builder.append(altContentId);
  builder.append("\",");
  JsonSerializer.appendString(builder, config.width);
  builder.append(',');
  JsonSerializer.appendString(builder, config.height);
  builder.append(",\"").append(flashMinVersion).append("\",");
  builder.append("null,null,");
  JsonSerializer.appendMap(builder, config.getParams());
  builder.append(',');
  JsonSerializer.appendMap(builder, config.getAttributes());
  builder.append(");");
  return builder.toString();
 } catch (IOException ioe) {
  // Should not happen
  throw new RuntimeException(ioe);
 }
}

代码示例来源:origin: org.gatein.shindig/shindig-gadgets

/**
 * Generate the correctly parameterized Javascript call to swfobject
 */
String buildSwfObjectCall(SwfObjectConfig config, String altContentId) {
 try {
  StringBuilder builder = new StringBuilder();
  builder.append("swfobject.embedSWF(");
  JsonSerializer.appendString(builder, config.swf.toString());
  builder.append(",\"");
  builder.append(altContentId);
  builder.append("\",");
  JsonSerializer.appendString(builder, config.width);
  builder.append(',');
  JsonSerializer.appendString(builder, config.height);
  builder.append(",\"").append(flashMinVersion).append("\",");
  builder.append("null,null,");
  JsonSerializer.appendMap(builder, config.getParams());
  builder.append(',');
  JsonSerializer.appendMap(builder, config.getAttributes());
  builder.append(");");
  return builder.toString();
 } catch (IOException ioe) {
  // Should not happen
  throw new RuntimeException(ioe);
 }
}

代码示例来源:origin: com.lmco.shindig/shindig-common

appendJsonArray(buf, (JSONArray) value);
} else if (value instanceof Map) {
 appendMap(buf, (Map<String, Object>) value);
} else if (value instanceof Multimap) {
 appendMultimap(buf, (Multimap<String, Object>) value);

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-common

appendJsonArray(buf, (JSONArray) value);
} else if (value instanceof Map) {
 appendMap(buf, (Map<String, Object>) value);
} else if (value instanceof Multimap) {
 appendMultimap(buf, (Multimap<String, Object>) value);

代码示例来源:origin: apache/shindig

appendJsonArray(buf, (JSONArray) value);
} else if (value instanceof Map) {
 appendMap(buf, (Map<String, Object>) value);
} else if (value instanceof Multimap) {
 appendMultimap(buf, (Multimap<String, Object>) value);

代码示例来源:origin: org.gatein.shindig/shindig-common

appendJsonArray(buf, (JSONArray) value);
} else if (value instanceof Map) {
 appendMap(buf, (Map<String, Object>) value);
} else if (value instanceof Multimap) {
 appendMultimap(buf, (Multimap<String, Object>) value);

代码示例来源:origin: org.apache.shindig/shindig-common

appendJsonArray(buf, (JSONArray) value);
} else if (value instanceof Map) {
 appendMap(buf, (Map<String, Object>) value);
} else if (value instanceof Multimap) {
 appendMultimap(buf, (Multimap<String, Object>) value);

相关文章