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

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

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

JsonNode.findValuesAsText介绍

[英]Similar to #findValues, but will additionally convert values into Strings, calling #getValueAsText.
[中]类似于#findValue,但将另外将值转换为字符串,调用#getValueAsText。

代码示例

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      foundSoFar = node.findValuesAsText(fieldName, foundSoFar);
    }
  }
  return foundSoFar;
}

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

/**
 * Similar to {@link #findValues}, but will additionally convert
 * values into Strings, calling {@link #getValueAsText}.
 * 
 * @since 1.6
 */
public final List<String> findValuesAsText(String fieldName)
{
  List<String> result = findValuesAsText(fieldName, null);
  if (result == null) {
    return Collections.emptyList();
  }
  return result;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        if (foundSoFar == null) {
          foundSoFar = new ArrayList<String>();
        }
        foundSoFar.add(entry.getValue().asText());
      } else { // only add children if parent not added
        foundSoFar = entry.getValue().findValuesAsText(fieldName, foundSoFar);
      }
    }
  }
  return foundSoFar;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      foundSoFar = node.findValuesAsText(fieldName, foundSoFar);
    }
  }
  return foundSoFar;
}

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

/**
 * Similar to {@link #findValues}, but will additionally convert
 * values into Strings, calling {@link #getValueAsText}.
 * 
 * @since 1.6
 */
public final List<String> findValuesAsText(String fieldName)
{
  List<String> result = findValuesAsText(fieldName, null);
  if (result == null) {
    return Collections.emptyList();
  }
  return result;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        if (foundSoFar == null) {
          foundSoFar = new ArrayList<String>();
        }
        foundSoFar.add(entry.getValue().asText());
      } else { // only add children if parent not added
        foundSoFar = entry.getValue().findValuesAsText(fieldName, foundSoFar);
      }
    }
  }
  return foundSoFar;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      foundSoFar = node.findValuesAsText(fieldName, foundSoFar);
    }
  }
  return foundSoFar;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      foundSoFar = node.findValuesAsText(fieldName, foundSoFar);
    }
  }
  return foundSoFar;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (JsonNode node : _children) {
      foundSoFar = node.findValuesAsText(fieldName, foundSoFar);
    }
  }
  return foundSoFar;
}

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

public List<String> findValuesAsText(final String fieldName)
{
  return delegate.findValuesAsText(fieldName);
}

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

/**
 * Similar to {@link #findValues}, but will additionally convert
 * values into Strings, calling {@link #getValueAsText}.
 * 
 * @since 1.6
 */
public final List<String> findValuesAsText(String fieldName)
{
  List<String> result = findValuesAsText(fieldName, null);
  if (result == null) {
    return Collections.emptyList();
  }
  return result;
}

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

/**
 * Similar to {@link #findValues}, but will additionally convert
 * values into Strings, calling {@link #getValueAsText}.
 * 
 * @since 1.6
 */
public final List<String> findValuesAsText(String fieldName)
{
  List<String> result = findValuesAsText(fieldName, null);
  if (result == null) {
    return Collections.emptyList();
  }
  return result;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        if (foundSoFar == null) {
          foundSoFar = new ArrayList<String>();
        }
        foundSoFar.add(entry.getValue().getValueAsText());
      } else { // only add children if parent not added
        foundSoFar = entry.getValue().findValuesAsText(fieldName, foundSoFar);
      }
    }
  }
  return foundSoFar;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        if (foundSoFar == null) {
          foundSoFar = new ArrayList<String>();
        }
        foundSoFar.add(entry.getValue().asText());
      } else { // only add children if parent not added
        foundSoFar = entry.getValue().findValuesAsText(fieldName, foundSoFar);
      }
    }
  }
  return foundSoFar;
}

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

@Override
public List<String> findValuesAsText(String fieldName, List<String> foundSoFar)
{
  if (_children != null) {
    for (Map.Entry<String, JsonNode> entry : _children.entrySet()) {
      if (fieldName.equals(entry.getKey())) {
        if (foundSoFar == null) {
          foundSoFar = new ArrayList<String>();
        }
        foundSoFar.add(entry.getValue().asText());
      } else { // only add children if parent not added
        foundSoFar = entry.getValue().findValuesAsText(fieldName, foundSoFar);
      }
    }
  }
  return foundSoFar;
}

代码示例来源:origin: net.java.dev.jets3t/jets3t

String resultCode = node.findValuesAsText("Code").get(0);
String accessKey = node.findValuesAsText("AccessKeyId").get(0);
String secretKey = node.findValuesAsText("SecretAccessKey").get(0);
String sessionToken = node.findValuesAsText("Token").get(0);
Date expiration = ServiceUtils.parseIso8601Date(
  node.findValuesAsText("Expiration").get(0));

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

String resultCode = node.findValuesAsText("Code").get(0);
String accessKey = node.findValuesAsText("AccessKeyId").get(0);
String secretKey = node.findValuesAsText("SecretAccessKey").get(0);
String sessionToken = node.findValuesAsText("Token").get(0);
Date expiration = ServiceUtils.parseIso8601Date(
  node.findValuesAsText("Expiration").get(0));

相关文章