当前位置: 首页>>代码示例>>Java>>正文


Java NullNode.instance方法代码示例

本文整理汇总了Java中org.codehaus.jackson.node.NullNode.instance方法的典型用法代码示例。如果您正苦于以下问题:Java NullNode.instance方法的具体用法?Java NullNode.instance怎么用?Java NullNode.instance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.codehaus.jackson.node.NullNode的用法示例。


在下文中一共展示了NullNode.instance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: _bindAsTree

import org.codehaus.jackson.node.NullNode; //导入方法依赖的package包/类
protected JsonNode _bindAsTree(JsonParser paramJsonParser)
  throws IOException, JsonParseException, JsonMappingException
{
  JsonToken localJsonToken = _initForReading(paramJsonParser);
  if ((localJsonToken == JsonToken.VALUE_NULL) || (localJsonToken == JsonToken.END_ARRAY) || (localJsonToken == JsonToken.END_OBJECT));
  DeserializationContext localDeserializationContext;
  for (Object localObject = NullNode.instance; ; localObject = (JsonNode)_findRootDeserializer(this._config, JSON_NODE_TYPE).deserialize(paramJsonParser, localDeserializationContext))
  {
    paramJsonParser.clearCurrentToken();
    return localObject;
    localDeserializationContext = _createDeserializationContext(paramJsonParser, this._config);
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:14,代码来源:ObjectReader.java

示例2: readTree

import org.codehaus.jackson.node.NullNode; //导入方法依赖的package包/类
public JsonNode readTree(InputStream paramInputStream)
  throws IOException, JsonProcessingException
{
  Object localObject = (JsonNode)readValue(paramInputStream, JSON_NODE_TYPE);
  if (localObject == null)
    localObject = NullNode.instance;
  return (JsonNode)localObject;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:9,代码来源:ObjectMapper.java

示例3: readTree

import org.codehaus.jackson.node.NullNode; //导入方法依赖的package包/类
public JsonNode readTree(File paramFile)
  throws IOException, JsonParseException
{
  Object localObject = (JsonNode)objectMapper().readValue(paramFile, JsonNode.class);
  if (localObject == null)
    localObject = NullNode.instance;
  return (JsonNode)localObject;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:9,代码来源:TreeMapper.java

示例4: readTree

import org.codehaus.jackson.node.NullNode; //导入方法依赖的package包/类
public JsonNode readTree(File src)
    throws IOException, JsonParseException
{

    JsonNode n = objectMapper().readValue(src, JsonNode.class);
    return (n == null) ? NullNode.instance : n;
}
 
开发者ID:r00li,项目名称:RHome,代码行数:8,代码来源:TreeMapper.java

示例5: readTree

import org.codehaus.jackson.node.NullNode; //导入方法依赖的package包/类
/**
 * Method to deserialize JSON content as tree expressed
 * using set of {@link JsonNode} instances. Returns
 * root of the resulting tree (where root can consist
 * of just a single node if the current event is a
 * value event, not container).
 *
 * @param cfg Specific deserialization configuration to use for
 *   this operation. Note that not all config settings can
 *   be changed on per-operation basis: some changeds only take effect
 *   before calling the operation for the first time (for the mapper
 *   instance)
 *
 * @since 1.1
 */
public JsonNode readTree(JsonParser jp, DeserializationConfig cfg)
    throws IOException, JsonProcessingException
{
    /* 02-Mar-2009, tatu: One twist; deserialization provider
     *   will map Json null straight into Java null. But what
     *   we want to return is the "null node" instead.
     */
    JsonNode n = (JsonNode) _readValue(cfg, jp, JSON_NODE_TYPE);
    return (n == null) ? NullNode.instance : n;
}
 
开发者ID:r00li,项目名称:RHome,代码行数:26,代码来源:ObjectMapper.java


注:本文中的org.codehaus.jackson.node.NullNode.instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。