本文整理了Java中org.codehaus.jackson.JsonNode.findParents()
方法的一些代码示例,展示了JsonNode.findParents()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonNode.findParents()
方法的具体详情如下:
包路径:org.codehaus.jackson.JsonNode
类名称:JsonNode
方法名:findParents
[英]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 List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (JsonNode node : _children) {
foundSoFar = node.findParents(fieldName, foundSoFar);
}
}
return foundSoFar;
}
代码示例来源:origin: org.codehaus.jackson/jackson-core-asl
/**
* 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.
*
* @param fieldName Name of field to look for
*
* @return Value of first matching node found, if any; null if none
*
* @since 1.6
*/
public final List<JsonNode> findParents(String fieldName)
{
List<JsonNode> result = findParents(fieldName, null);
if (result == null) {
return Collections.emptyList();
}
return result;
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
if (fieldName.equals(entry.getKey())) {
if (foundSoFar == null) {
foundSoFar = new ArrayList<JsonNode>();
}
foundSoFar.add(this);
} else { // only add children if parent not added
foundSoFar = entry.getValue().findParents(fieldName, foundSoFar);
}
}
}
return foundSoFar;
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (JsonNode node : _children) {
foundSoFar = node.findParents(fieldName, foundSoFar);
}
}
return foundSoFar;
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* 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.
*
* @param fieldName Name of field to look for
*
* @return Value of first matching node found, if any; null if none
*
* @since 1.6
*/
public final List<JsonNode> findParents(String fieldName)
{
List<JsonNode> result = findParents(fieldName, null);
if (result == null) {
return Collections.emptyList();
}
return result;
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
if (fieldName.equals(entry.getKey())) {
if (foundSoFar == null) {
foundSoFar = new ArrayList<JsonNode>();
}
foundSoFar.add(this);
} else { // only add children if parent not added
foundSoFar = entry.getValue().findParents(fieldName, foundSoFar);
}
}
}
return foundSoFar;
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (JsonNode node : _children) {
foundSoFar = node.findParents(fieldName, foundSoFar);
}
}
return foundSoFar;
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (JsonNode node : _children) {
foundSoFar = node.findParents(fieldName, foundSoFar);
}
}
return foundSoFar;
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (JsonNode node : _children) {
foundSoFar = node.findParents(fieldName, foundSoFar);
}
}
return foundSoFar;
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
/**
* 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.
*
* @param fieldName Name of field to look for
*
* @return Value of first matching node found, if any; null if none
*
* @since 1.6
*/
public final List<JsonNode> findParents(String fieldName)
{
List<JsonNode> result = findParents(fieldName, null);
if (result == null) {
return Collections.emptyList();
}
return result;
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
/**
* 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.
*
* @param fieldName Name of field to look for
*
* @return Value of first matching node found, if any; null if none
*
* @since 1.6
*/
public final List<JsonNode> findParents(String fieldName)
{
List<JsonNode> result = findParents(fieldName, null);
if (result == null) {
return Collections.emptyList();
}
return result;
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
if (fieldName.equals(entry.getKey())) {
if (foundSoFar == null) {
foundSoFar = new ArrayList<JsonNode>();
}
foundSoFar.add(this);
} else { // only add children if parent not added
foundSoFar = entry.getValue().findParents(fieldName, foundSoFar);
}
}
}
return foundSoFar;
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
if (fieldName.equals(entry.getKey())) {
if (foundSoFar == null) {
foundSoFar = new ArrayList<JsonNode>();
}
foundSoFar.add(this);
} else { // only add children if parent not added
foundSoFar = entry.getValue().findParents(fieldName, foundSoFar);
}
}
}
return foundSoFar;
}
代码示例来源:origin: com.atlassian.jira/jira-core
public List<ReadOnlyJsonNode> findParents(final String fieldName)
{
return wrap(delegate.findParents(fieldName));
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
@Override
public List<JsonNode> findParents(String fieldName, List<JsonNode> foundSoFar)
{
if (_children != null) {
for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
if (fieldName.equals(entry.getKey())) {
if (foundSoFar == null) {
foundSoFar = new ArrayList<JsonNode>();
}
foundSoFar.add(this);
} else { // only add children if parent not added
foundSoFar = entry.getValue().findParents(fieldName, foundSoFar);
}
}
}
return foundSoFar;
}
内容来源于网络,如有侵权,请联系作者删除!