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

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

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

JsonNode.getBigIntegerValue介绍

暂无

代码示例

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

@Override
public BigInteger getBigIntegerValue() throws IOException, JsonParseException
{
  return currentNumericNode().getBigIntegerValue();
}

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

@Override
public BigInteger getBigIntegerValue() throws IOException, JsonParseException
{
  return currentNumericNode().getBigIntegerValue();
}

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

public BigInteger getBigIntegerValue()
{
  return delegate.getBigIntegerValue();
}

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

@Override
public BigInteger getBigIntegerValue() throws IOException, JsonParseException
{
  return currentNumericNode().getBigIntegerValue();
}

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

@Override
public BigInteger getBigIntegerValue() throws IOException, JsonParseException
{
  return currentNumericNode().getBigIntegerValue();
}

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

@Override
public BigInteger getBigIntegerValue() throws IOException, JsonParseException
{
  return currentNumericNode().getBigIntegerValue();
}

代码示例来源:origin: dbpedia/chatbot

private String getTvOrMovieId(String url, String query) {
  try {
    url += "?api_key=" + apiKey + "&query=" + Utility.urlEncode(query);
    JsonNode node = makeRequest(url);
    return node.get("results").get(0).get("id").getBigIntegerValue().toString();
  }
  catch (Exception e) {
    e.printStackTrace();
  }
  return null;
}

代码示例来源:origin: org.apache.isis.viewer/json-applib

private BigInteger getBigInteger(final String path, final JsonNode node) {
  if (representsNull(node)) {
    return null;
  }
  checkValue(path, node, "a biginteger");
  if (!node.isBigInteger()) {
    throw new IllegalArgumentException(formatExMsg(path, "is not a biginteger"));
  }
  return node.getBigIntegerValue();
}

代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib

private BigInteger getBigInteger(String path, JsonNode node) {
  if (node.isBigInteger()) {
    return node.getBigIntegerValue();
  }
  if (node.isTextual()) {
    return new BigInteger(node.getTextValue());
  }
  if (node.isLong()) {
    return BigInteger.valueOf(node.getLongValue());
  }
  if (node.isInt()) {
    return BigInteger.valueOf(node.getIntValue());
  }
  throw new IllegalArgumentException(formatExMsg(path, "is not a biginteger, is not any other integral number, is not text parseable as a biginteger"));
}

代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib

private BigDecimal getBigDecimal(String path, JsonNode node) {
  if (node.isBigDecimal()) {
    return node.getDecimalValue();
  }
  if (node.isTextual()) {
    return new BigDecimal(node.getTextValue());
  }
  if (node.isLong()) {
    return new BigDecimal(node.getLongValue());
  }
  if (node.isDouble()) {
    // there will be rounding errors, most likely
    return new BigDecimal(node.getDoubleValue());
  }
  if (node.isBigInteger()) {
    return new BigDecimal(node.getBigIntegerValue());
  }
  if (node.isInt()) {
    return new BigDecimal(node.getIntValue());
  }
  throw new IllegalArgumentException(formatExMsg(path, "is not a bigdecimal, is not any other numeric, is not text parseable as a bigdecimal"));
}

代码示例来源:origin: de.mhus.lib/mhu-lib-core

case "java.lang.Byte": return val.getBinaryValue()[0];
case "java.lang.Integer": return val.getIntValue();
case "java.lang.Short": return val.getBigIntegerValue().shortValue();
case "java.lang.Double": return val.getDoubleValue();
case "java.lang.Float": return val.getBigIntegerValue().floatValue();
case "java.lang.Long": return val.getBigIntegerValue().longValue();
case "java.lang.Character": return (char)val.getIntValue();

代码示例来源:origin: de.mhus.lib/mhu-lib-core

out = node.getDecimalValue();
else if (node.isBigInteger())
  out = node.getBigIntegerValue();
else if (node.isBinary())
  out = node.getBinaryValue();

代码示例来源:origin: net.sf.jsog/jsog

set(jsonNode.getDecimalValue());
} else if (jsonNode.isBigInteger()) {
  set(jsonNode.getBigIntegerValue());
} else if (jsonNode.isDouble()) {
  set(jsonNode.getDoubleValue());

代码示例来源:origin: lordofthejars/nosql-unit

private Object simpleValue(JsonNode simpleValue) {
  if (simpleValue.isNumber()) {
    switch (simpleValue.getNumberType()) {
    case BIG_DECIMAL:
      return simpleValue.getDecimalValue();
    case BIG_INTEGER:
      return simpleValue.getBigIntegerValue();
    case DOUBLE:
      return simpleValue.getDoubleValue();
    case FLOAT:
      return simpleValue.getDoubleValue();
    case INT:
      return simpleValue.getIntValue();
    case LONG:
      return simpleValue.getLongValue();
    default:
      return simpleValue.getTextValue();
    }
  } else {
    return simpleValue.getTextValue();
  }
}

代码示例来源:origin: com.lordofthejars/nosqlunit-core

private Object simpleValue(JsonNode simpleValue) {
  if (simpleValue.isNumber()) {
    switch (simpleValue.getNumberType()) {
    case BIG_DECIMAL:
      return simpleValue.getDecimalValue();
    case BIG_INTEGER:
      return simpleValue.getBigIntegerValue();
    case DOUBLE:
      return simpleValue.getDoubleValue();
    case FLOAT:
      return simpleValue.getDoubleValue();
    case INT:
      return simpleValue.getIntValue();
    case LONG:
      return simpleValue.getLongValue();
    default:
      return simpleValue.getTextValue();
    }
  } else {
    return simpleValue.getTextValue();
  }
}

代码示例来源: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;
  }
}

相关文章