本文整理了Java中org.codehaus.jackson.JsonNode.isPojo()
方法的一些代码示例,展示了JsonNode.isPojo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonNode.isPojo()
方法的具体详情如下:
包路径:org.codehaus.jackson.JsonNode
类名称:JsonNode
方法名:isPojo
[英]Method that can be used to check if the node is a wrapper for a POJO ("Plain Old Java Object" aka "bean". Returns true only for instances of org.codehaus.jackson.node.POJONode.
[中]方法,该方法可用于检查节点是否是POJO(“纯旧Java对象”又名“bean”)的包装器。仅对org.codehaus.jackson.node.POJONode的实例返回true。
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public byte[] getBinaryValue(Base64Variant b64variant)
throws IOException, JsonParseException
{
// Multiple possibilities...
JsonNode n = currentNode();
if (n != null) { // binary node?
byte[] data = n.getBinaryValue();
// (or TextNode, which can also convert automatically!)
if (data != null) {
return data;
}
// Or maybe byte[] as POJO?
if (n.isPojo()) {
Object ob = ((POJONode) n).getPojo();
if (ob instanceof byte[]) {
return (byte[]) ob;
}
}
}
// otherwise return null to mark we have no binary content
return null;
}
代码示例来源: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: camunda/camunda-bpm-platform
@Override
public byte[] getBinaryValue(Base64Variant b64variant)
throws IOException, JsonParseException
{
// Multiple possibilities...
JsonNode n = currentNode();
if (n != null) { // binary node?
byte[] data = n.getBinaryValue();
// (or TextNode, which can also convert automatically!)
if (data != null) {
return data;
}
// Or maybe byte[] as POJO?
if (n.isPojo()) {
Object ob = ((POJONode) n).getPojo();
if (ob instanceof byte[]) {
return (byte[]) ob;
}
}
}
// otherwise return null to mark we have no binary content
return null;
}
代码示例来源: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: com.atlassian.jira/jira-core
public boolean isPojo()
{
return delegate.isPojo();
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
@Override
public Object getEmbeddedObject() {
if (!_closed) {
JsonNode n = currentNode();
if (n != null && n.isPojo()) {
return ((POJONode) n).getPojo();
}
}
return null;
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
@Override
public Object getEmbeddedObject() {
if (!_closed) {
JsonNode n = currentNode();
if (n != null && n.isPojo()) {
return ((POJONode) n).getPojo();
}
}
return null;
}
代码示例来源:origin: com.googlecode.etl-unit/json-validator
if (!thisNode.isObject() && !thisNode.isPojo())
else if (thisNode.isPojo())
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
@Override
public byte[] getBinaryValue(Base64Variant b64variant)
throws IOException, JsonParseException
{
// Multiple possibilities...
JsonNode n = currentNode();
if (n != null) { // binary node?
byte[] data = n.getBinaryValue();
// (or TextNode, which can also convert automatically!)
if (data != null) {
return data;
}
// Or maybe byte[] as POJO?
if (n.isPojo()) {
Object ob = ((POJONode) n).getPojo();
if (ob instanceof byte[]) {
return (byte[]) ob;
}
}
}
// otherwise return null to mark we have no binary content
return null;
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public byte[] getBinaryValue(Base64Variant b64variant)
throws IOException, JsonParseException
{
// Multiple possibilities...
JsonNode n = currentNode();
if (n != null) { // binary node?
byte[] data = n.getBinaryValue();
// (or TextNode, which can also convert automatically!)
if (data != null) {
return data;
}
// Or maybe byte[] as POJO?
if (n.isPojo()) {
Object ob = ((POJONode) n).getPojo();
if (ob instanceof byte[]) {
return (byte[]) ob;
}
}
}
// otherwise return null to mark we have no binary content
return null;
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
@Override
public byte[] getBinaryValue(Base64Variant b64variant)
throws IOException, JsonParseException
{
// Multiple possibilities...
JsonNode n = currentNode();
if (n != null) { // binary node?
byte[] data = n.getBinaryValue();
// (or TextNode, which can also convert automatically!)
if (data != null) {
return data;
}
// Or maybe byte[] as POJO?
if (n.isPojo()) {
Object ob = ((POJONode) n).getPojo();
if (ob instanceof byte[]) {
return (byte[]) ob;
}
}
}
// otherwise return null to mark we have no binary content
return null;
}
代码示例来源: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.googlecode.etl-unit/json-validator
(lvalue.isPojo() && rvalue.isPojo())
内容来源于网络,如有侵权,请联系作者删除!