org.codehaus.jackson.JsonNode.findParent()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(341)

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

JsonNode.findParent介绍

[英]Method for finding a JSON Object that contains specified field, within this node or its descendants. If no matching field is found in this node or its descendants, returns null.
[中]方法,用于在此节点或其子节点内查找包含指定字段的JSON对象。如果在此节点或其子节点中未找到匹配字段,则返回null。

代码示例

代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      JsonNode parent = node.findParent(fieldName);
      if (parent != null) {
        return (ObjectNode) parent;
      }
    }
  }
  return null;        
}

代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        return this;
      }
      JsonNode value = entry.getValue().findParent(fieldName);
      if (value != null) {
        return (ObjectNode) value;
      }
    }
  }
  return null;
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      JsonNode parent = node.findParent(fieldName);
      if (parent != null) {
        return (ObjectNode) parent;
      }
    }
  }
  return null;        
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        return this;
      }
      JsonNode value = entry.getValue().findParent(fieldName);
      if (value != null) {
        return (ObjectNode) value;
      }
    }
  }
  return null;
}

代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      JsonNode parent = node.findParent(fieldName);
      if (parent != null) {
        return (ObjectNode) parent;
      }
    }
  }
  return null;        
}

代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      JsonNode parent = node.findParent(fieldName);
      if (parent != null) {
        return (ObjectNode) parent;
      }
    }
  }
  return null;        
}

代码示例来源:origin: ovea-deprecated/jetty-session-redis

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      JsonNode parent = node.findParent(fieldName);
      if (parent != null) {
        return (ObjectNode) parent;
      }
    }
  }
  return null;        
}

代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        return this;
      }
      JsonNode value = entry.getValue().findParent(fieldName);
      if (value != null) {
        return (ObjectNode) value;
      }
    }
  }
  return null;
}

代码示例来源:origin: ovea-deprecated/jetty-session-redis

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        return this;
      }
      JsonNode value = entry.getValue().findParent(fieldName);
      if (value != null) {
        return (ObjectNode) value;
      }
    }
  }
  return null;
}

代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson

@Override
public ObjectNode findParent(String fieldName)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        return this;
      }
      JsonNode value = entry.getValue().findParent(fieldName);
      if (value != null) {
        return (ObjectNode) value;
      }
    }
  }
  return null;
}

代码示例来源:origin: com.atlassian.jira/jira-core

public ReadOnlyJsonNode findParent(final String fieldName)
{
  return wrap(delegate.findParent(fieldName));
}

相关文章