本文整理了Java中org.codehaus.jackson.JsonNode.asToken()
方法的一些代码示例,展示了JsonNode.asToken()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonNode.asToken()
方法的具体详情如下:
包路径:org.codehaus.jackson.JsonNode
类名称:JsonNode
方法名:asToken
[英]Method that can be used for efficient type detection when using stream abstraction for traversing nodes. Will return the first JsonToken that equivalent stream event would produce (for most nodes there is just one token but for structured/container types multiple)
[中]方法,该方法在使用流抽象遍历节点时可用于有效的类型检测。将返回等效流事件将产生的第一个JsonToken(对于大多数节点,只有一个令牌,但是对于结构化/容器类型,有多个令牌)
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public JsonToken nextToken() {
if (!_done) {
_done = true;
return _node.asToken();
}
_node = null;
return null;
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public JsonToken nextToken()
{
if (!_contents.hasNext()) {
_currentNode = null;
return null;
}
_currentNode = _contents.next();
return _currentNode.asToken();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
@Override
public JsonToken nextToken()
{
// Need a new entry?
if (_needEntry) {
if (!_contents.hasNext()) {
_current = null;
return null;
}
_needEntry = false;
_current = _contents.next();
return JsonToken.FIELD_NAME;
}
_needEntry = true;
return _current.getValue().asToken();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-asl
protected JsonNode currentNumericNode()
throws JsonParseException
{
JsonNode n = currentNode();
if (n == null || !n.isNumber()) {
JsonToken t = (n == null) ? null : n.asToken();
throw _constructError("Current token ("+t+") not numeric, can not use numeric value accessors");
}
return n;
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public JsonToken nextToken() {
if (!_done) {
_done = true;
return _node.asToken();
}
_node = null;
return null;
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public JsonToken nextToken()
{
if (!_contents.hasNext()) {
_currentNode = null;
return null;
}
_currentNode = _contents.next();
return _currentNode.asToken();
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public JsonToken nextToken()
{
// Need a new entry?
if (_needEntry) {
if (!_contents.hasNext()) {
_current = null;
return null;
}
_needEntry = false;
_current = _contents.next();
return JsonToken.FIELD_NAME;
}
_needEntry = true;
return _current.getValue().asToken();
}
代码示例来源:origin: org.apache.avro/avro
switch(node.asToken()) {
case VALUE_NUMBER_INT:
out.writeIndex(JsonType.LONG.ordinal());
break;
default:
throw new AvroRuntimeException(node.asToken()+" unexpected: "+node);
代码示例来源:origin: camunda/camunda-bpm-platform
protected JsonNode currentNumericNode()
throws JsonParseException
{
JsonNode n = currentNode();
if (n == null || !n.isNumber()) {
JsonToken t = (n == null) ? null : n.asToken();
throw _constructError("Current token ("+t+") not numeric, can not use numeric value accessors");
}
return n;
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
@Override
public JsonToken nextToken() {
if (!_done) {
_done = true;
return _node.asToken();
}
_node = null;
return null;
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
@Override
public JsonToken nextToken() {
if (!_done) {
_done = true;
return _node.asToken();
}
_node = null;
return null;
}
代码示例来源:origin: com.atlassian.jira/jira-core
public JsonToken asToken()
{
return delegate.asToken();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public JsonToken nextToken() {
if (!_done) {
_done = true;
return _node.asToken();
}
_node = null;
return null;
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
@Override
public JsonToken nextToken()
{
if (!_contents.hasNext()) {
_currentNode = null;
return null;
}
_currentNode = _contents.next();
return _currentNode.asToken();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
@Override
public JsonToken nextToken()
{
if (!_contents.hasNext()) {
_currentNode = null;
return null;
}
_currentNode = _contents.next();
return _currentNode.asToken();
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
@Override
public JsonToken nextToken()
{
if (!_contents.hasNext()) {
_currentNode = null;
return null;
}
_currentNode = _contents.next();
return _currentNode.asToken();
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
@Override
public JsonToken nextToken()
{
// Need a new entry?
if (_needEntry) {
if (!_contents.hasNext()) {
_current = null;
return null;
}
_needEntry = false;
_current = _contents.next();
return JsonToken.FIELD_NAME;
}
_needEntry = true;
return _current.getValue().asToken();
}
代码示例来源:origin: org.codehaus.jackson/jackson-mapper-lgpl
protected JsonNode currentNumericNode()
throws JsonParseException
{
JsonNode n = currentNode();
if (n == null || !n.isNumber()) {
JsonToken t = (n == null) ? null : n.asToken();
throw _constructError("Current token ("+t+") not numeric, can not use numeric value accessors");
}
return n;
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
protected JsonNode currentNumericNode()
throws JsonParseException
{
JsonNode n = currentNode();
if (n == null || !n.isNumber()) {
JsonToken t = (n == null) ? null : n.asToken();
throw _constructError("Current token ("+t+") not numeric, can not use numeric value accessors");
}
return n;
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
protected JsonNode currentNumericNode()
throws JsonParseException
{
JsonNode n = currentNode();
if (n == null || !n.isNumber()) {
JsonToken t = (n == null) ? null : n.asToken();
throw _constructError("Current token ("+t+") not numeric, can not use numeric value accessors");
}
return n;
}
内容来源于网络,如有侵权,请联系作者删除!