作者:jixiaojia | 来源:互联网 | 2023-09-18 14:41
本文整理了Java中org.apache.avro.generic.GenericData.writeEscapedString()方法的一些代码示例,展示了
本文整理了Java中org.apache.avro.generic.GenericData.writeEscapedString()
方法的一些代码示例,展示了GenericData.writeEscapedString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GenericData.writeEscapedString()
方法的具体详情如下:
包路径:org.apache.avro.generic.GenericData
类名称:GenericData
方法名:writeEscapedString
GenericData.writeEscapedString介绍
暂无
代码示例
代码示例来源:origin: apache/avro
for (Map.Entry entry : map.entrySet()) {
buffer.append("\"");
writeEscapedString(String.valueOf(entry.getKey()), buffer);
buffer.append("\": ");
toString(entry.getValue(), buffer, seenObjects);
} else if (isString(datum)|| isEnum(datum)) {
buffer.append("\"");
writeEscapedString(datum.toString(), buffer);
buffer.append("\"");
} else if (isBytes(datum)) {
buffer.append("{\"bytes\": \"");
ByteBuffer bytes = ((ByteBuffer) datum).duplicate();
writeEscapedString(StandardCharsets.ISO_8859_1.decode(bytes), buffer);
buffer.append("\"}");
} else if (((datum instanceof Float) && // quote Nan & Infinity
代码示例来源:origin: org.apache.avro/avro
} else if (isString(datum)|| isEnum(datum)) {
buffer.append("\"");
writeEscapedString(datum.toString(), buffer);
buffer.append("\"");
} else if (isBytes(datum)) {
buffer.append("{\"bytes\": \"");
ByteBuffer bytes = ((ByteBuffer) datum).duplicate();
writeEscapedString(StandardCharsets.ISO_8859_1.decode(bytes), buffer);
buffer.append("\"}");
} else if (((datum instanceof Float) && // quote Nan & Infinity
代码示例来源:origin: com.facebook.presto.hive/hive-apache
} else if (isString(datum)|| isEnum(datum)) {
buffer.append("\"");
writeEscapedString(datum.toString(), buffer);
buffer.append("\"");
} else if (isBytes(datum)) {
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro
} else if (isString(datum)|| isEnum(datum)) {
buffer.append("\"");
writeEscapedString(datum.toString(), buffer);
buffer.append("\"");
} else if (isBytes(datum)) {
buffer.append("{\"bytes\": \"");
ByteBuffer bytes = ((ByteBuffer) datum).duplicate();
writeEscapedString(StandardCharsets.ISO_8859_1.decode(bytes), buffer);
buffer.append("\"}");
} else if (((datum instanceof Float) && // quote Nan & Infinity