本文整理了Java中org.codehaus.jackson.JsonNode.isBinary()
方法的一些代码示例,展示了JsonNode.isBinary()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonNode.isBinary()
方法的具体详情如下:
包路径:org.codehaus.jackson.JsonNode
类名称:JsonNode
方法名:isBinary
[英]Method that can be used to check if this node represents binary data (Base64 encoded). Although this will be externally written as Json String value, #isTextual will return false if this method returns true.
[中]方法,该方法可用于检查此节点是否表示二进制数据(Base64编码)。虽然这将在外部写入Json字符串值,但如果此方法返回true,则#isTextual将返回false。
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public Object getEmbeddedObject()
{
if (!_closed) {
JsonNode n = currentNode();
if (n != null) {
if (n.isPojo()) {
return ((POJONode) n).getPojo();
}
if (n.isBinary()) {
return ((BinaryNode) n).getBinaryValue();
}
}
}
return null;
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public String getText()
{
if (_closed) {
return null;
}
// need to separate handling a bit...
switch (_currToken) {
case FIELD_NAME:
return _nodeCursor.getCurrentName();
case VALUE_STRING:
return currentNode().getTextValue();
case VALUE_NUMBER_INT:
case VALUE_NUMBER_FLOAT:
return String.valueOf(currentNode().getNumberValue());
case VALUE_EMBEDDED_OBJECT:
JsonNode n = currentNode();
if (n != null && n.isBinary()) {
// this will convert it to base64
return n.asText();
}
}
return (_currToken == null) ? null : _currToken.asString();
}
代码示例来源:origin: apache/nifi
if (fieldNode.isBinary()) {
return fieldNode.getBinaryValue();
代码示例来源:origin: apache/nifi
if (fieldNode.isBinary()) {
return fieldNode.getBinaryValue();
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public Object getEmbeddedObject()
{
if (!_closed) {
JsonNode n = currentNode();
if (n != null) {
if (n.isPojo()) {
return ((POJONode) n).getPojo();
}
if (n.isBinary()) {
return ((BinaryNode) n).getBinaryValue();
}
}
}
return null;
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public String getText()
{
if (_closed) {
return null;
}
// need to separate handling a bit...
switch (_currToken) {
case FIELD_NAME:
return _nodeCursor.getCurrentName();
case VALUE_STRING:
return currentNode().getTextValue();
case VALUE_NUMBER_INT:
case VALUE_NUMBER_FLOAT:
return String.valueOf(currentNode().getNumberValue());
case VALUE_EMBEDDED_OBJECT:
JsonNode n = currentNode();
if (n != null && n.isBinary()) {
// this will convert it to base64
return n.asText();
}
}
return (_currToken == null) ? null : _currToken.asString();
}
代码示例来源:origin: com.atlassian.jira/jira-core
public boolean isBinary()
{
return delegate.isBinary();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public Object getEmbeddedObject()
{
if (!_closed) {
JsonNode n = currentNode();
if (n != null) {
if (n.isPojo()) {
return ((POJONode) n).getPojo();
}
if (n.isBinary()) {
return ((BinaryNode) n).getBinaryValue();
}
}
}
return null;
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
@Override
public String getText()
{
if (_closed) {
return null;
}
// need to separate handling a bit...
switch (_currToken) {
case FIELD_NAME:
return _nodeCursor.getCurrentName();
case VALUE_STRING:
return currentNode().getTextValue();
case VALUE_NUMBER_INT:
case VALUE_NUMBER_FLOAT:
return String.valueOf(currentNode().getNumberValue());
case VALUE_EMBEDDED_OBJECT:
JsonNode n = currentNode();
if (n != null && n.isBinary()) {
// this will convert it to base64
return n.getValueAsText();
}
}
return (_currToken == null) ? null : _currToken.asString();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public String getText()
{
if (_closed) {
return null;
}
// need to separate handling a bit...
switch (_currToken) {
case FIELD_NAME:
return _nodeCursor.getCurrentName();
case VALUE_STRING:
return currentNode().getTextValue();
case VALUE_NUMBER_INT:
case VALUE_NUMBER_FLOAT:
return String.valueOf(currentNode().getNumberValue());
case VALUE_EMBEDDED_OBJECT:
JsonNode n = currentNode();
if (n != null && n.isBinary()) {
// this will convert it to base64
return n.asText();
}
}
return (_currToken == null) ? null : _currToken.asString();
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
@Override
public String getText()
{
if (_closed) {
return null;
}
// need to separate handling a bit...
switch (_currToken) {
case FIELD_NAME:
return _nodeCursor.getCurrentName();
case VALUE_STRING:
return currentNode().getTextValue();
case VALUE_NUMBER_INT:
case VALUE_NUMBER_FLOAT:
return String.valueOf(currentNode().getNumberValue());
case VALUE_EMBEDDED_OBJECT:
JsonNode n = currentNode();
if (n != null && n.isBinary()) {
// this will convert it to base64
return n.asText();
}
}
return (_currToken == null) ? null : _currToken.asString();
}
代码示例来源:origin: de.mhus.lib/mhu-lib-core
else if (node.isBigInteger())
out = node.getBigIntegerValue();
else if (node.isBinary())
out = node.getBinaryValue();
else if (node.isBoolean())
代码示例来源:origin: org.apache.nifi/nifi-site-to-site-reporting-task
if (fieldNode.isBinary()) {
return fieldNode.getBinaryValue();
代码示例来源:origin: de.mhus.lib/mhu-lib-core
public static Object getValue(JsonNode node, TransformHelper helper) {
Object out = null;
if (node == null) return null;
try {
if (node.isTextual())
out = node.asText();
else if (node.isNull())
out = null;
else if (node.isBigDecimal())
out = node.getDecimalValue();
else if (node.isBigInteger())
out = node.getBigIntegerValue();
else if (node.isBinary())
out = node.getBinaryValue();
else if (node.isBoolean())
out = node.getBooleanValue();
else if (node.isDouble())
out = node.getDoubleValue();
else if (node.isInt())
out = node.getIntValue();
else if (node.isLong())
out = node.getLongValue();
else if (node.isNumber())
out = node.getNumberValue();
} catch (IOException e) {}
return out;
}
代码示例来源:origin: de.mhus.lib/mhu-lib-core
public static Object getValue(JsonNode node, TransformHelper helper) {
Object out = null;
if (node == null) return null;
try {
if (node.isTextual())
out = node.asText();
else if (node.isNull())
out = null;
else if (node.isBigDecimal())
out = node.getDecimalValue();
else if (node.isBigInteger())
out = node.getBigIntegerValue();
else if (node.isBinary())
out = node.getBinaryValue();
else if (node.isBoolean())
out = node.getBooleanValue();
else if (node.isDouble())
out = node.getDoubleValue();
else if (node.isInt())
out = node.getIntValue();
else if (node.isLong())
out = node.getLongValue();
else if (node.isNumber())
out = node.getNumberValue();
} catch (IOException e) {}
return out;
}
}
内容来源于网络,如有侵权,请联系作者删除!