本文整理了Java中org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode.isTextual()
方法的一些代码示例,展示了JsonNode.isTextual()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonNode.isTextual()
方法的具体详情如下:
包路径:org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode
类名称:JsonNode
方法名:isTextual
暂无
代码示例来源:origin: apache/flink
private static TypeInformation<?> convertStringFormat(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + FORMAT + "' property in node: " + location);
}
switch (node.asText()) {
case FORMAT_DATE:
return Types.SQL_DATE;
case FORMAT_TIME:
return Types.SQL_TIME;
case FORMAT_DATE_TIME:
return Types.SQL_TIMESTAMP;
default:
return Types.STRING; // unlikely that we will support other formats in the future
}
}
代码示例来源:origin: apache/flink
private static TypeInformation<?> convertStringEncoding(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + CONTENT_ENCODING + "' property in node: " + location);
}
// "If the instance value is a string, this property defines that the string SHOULD
// be interpreted as binary data and decoded using the encoding named by this property."
switch (node.asText()) {
case CONTENT_ENCODING_BASE64:
return Types.PRIMITIVE_ARRAY(Types.BYTE);
default:
// we fail hard here:
// this gives us the chance to support more encodings in the future without problems
// of backwards compatibility
throw new IllegalArgumentException("Invalid encoding '" + node.asText() + "' in node: " + location);
}
}
代码示例来源:origin: apache/flink
if (node.has(REF) && node.get(REF).isTextual()) {
else if (typeNode.isTextual()) {
types.add(typeNode.asText());
代码示例来源:origin: apache/flink
assertNotNull(nameField);
assertNotNull(arrayField);
assertTrue(idField.isTextual());
assertTrue(nameField.isTextual());
assertTrue(arrayField.isArray());
assertTrue(vertexIdField.isTextual());
assertNotNull(parallelismField);
assertTrue(parallelismField.isNumber());
assertNotNull(contentsFields);
assertTrue(contentsFields.isTextual());
assertNotNull(operatorField);
assertTrue(operatorField.isTextual());
assertTrue(inputIdField.isTextual());
代码示例来源:origin: org.apache.flink/flink-json
private static TypeInformation<?> convertStringFormat(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + FORMAT + "' property in node: " + location);
}
switch (node.asText()) {
case FORMAT_DATE:
return Types.SQL_DATE;
case FORMAT_TIME:
return Types.SQL_TIME;
case FORMAT_DATE_TIME:
return Types.SQL_TIMESTAMP;
default:
return Types.STRING; // unlikely that we will support other formats in the future
}
}
代码示例来源:origin: com.alibaba.blink/flink-json
private static TypeInformation<?> convertStringFormat(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + FORMAT + "' property in node: " + location);
}
switch (node.asText()) {
case FORMAT_DATE:
return Types.SQL_DATE;
case FORMAT_TIME:
return Types.SQL_TIME;
case FORMAT_DATE_TIME:
return Types.SQL_TIMESTAMP;
default:
return Types.STRING; // unlikely that we will support other formats in the future
}
}
代码示例来源:origin: org.apache.flink/flink-json
private static TypeInformation<?> convertStringEncoding(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + CONTENT_ENCODING + "' property in node: " + location);
}
// "If the instance value is a string, this property defines that the string SHOULD
// be interpreted as binary data and decoded using the encoding named by this property."
switch (node.asText()) {
case CONTENT_ENCODING_BASE64:
return Types.PRIMITIVE_ARRAY(Types.BYTE);
default:
// we fail hard here:
// this gives us the chance to support more encodings in the future without problems
// of backwards compatibility
throw new IllegalArgumentException("Invalid encoding '" + node.asText() + "' in node: " + location);
}
}
代码示例来源:origin: com.alibaba.blink/flink-json
private static TypeInformation<?> convertStringEncoding(String location, JsonNode node) {
if (!node.isTextual()) {
throw new IllegalArgumentException("Invalid '" + CONTENT_ENCODING + "' property in node: " + location);
}
// "If the instance value is a string, this property defines that the string SHOULD
// be interpreted as binary data and decoded using the encoding named by this property."
switch (node.asText()) {
case CONTENT_ENCODING_BASE64:
return Types.PRIMITIVE_ARRAY(Types.BYTE);
default:
// we fail hard here:
// this gives us the chance to support more encodings in the future without problems
// of backwards compatibility
throw new IllegalArgumentException("Invalid encoding '" + node.asText() + "' in node: " + location);
}
}
代码示例来源:origin: com.alibaba.blink/flink-json
if (node.has(REF) && node.get(REF).isTextual()) {
else if (typeNode.isTextual()) {
types.add(typeNode.asText());
代码示例来源:origin: org.apache.flink/flink-json
if (node.has(REF) && node.get(REF).isTextual()) {
else if (typeNode.isTextual()) {
types.add(typeNode.asText());
内容来源于网络,如有侵权,请联系作者删除!