com.fasterxml.jackson.databind.node.ArrayNode.nullNode()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(191)

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

ArrayNode.nullNode介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

/**
 * Method that will insert a null value
 * at specified position in this array.
 *
 * @return This array node, to allow chaining
 */
public ArrayNode insertNull(int index)
{
  _insert(index, nullNode());
  return this;
}

代码示例来源:origin: redisson/redisson

/**
 * Method that will add a null value at the end of this array node.
 *
 * @return This array node, to allow chaining
 */
public ArrayNode addNull()
{
  _add(nullNode());
  return this;
}

代码示例来源:origin: redisson/redisson

/**
 * Method that will set specified field, replacing old value,
 * if any.
 *
 * @param value to set field to; if null, will be converted
 *   to a {@link NullNode} first  (to remove field entry, call
 *   {@link #remove} instead)
 *
 * @return Old value of the field, if any; null if there was no
 *   old value.
 */
public JsonNode set(int index, JsonNode value)
{
  if (value == null) { // let's not store 'raw' nulls but nodes
    value = nullNode();
  }
  if (index < 0 || index >= _children.size()) {
    throw new IndexOutOfBoundsException("Illegal index "+ index +", array size "+size());
  }
  return _children.set(index, value);
}

代码示例来源:origin: redisson/redisson

/**
 * Method for adding specified node at the end of this array.
 *
 * @return This node, to allow chaining
 */
public ArrayNode add(JsonNode value)
{
  if (value == null) { // let's not store 'raw' nulls but nodes
    value = nullNode();
  }
  _add(value);
  return this;
}

代码示例来源:origin: redisson/redisson

/**
 * Method for inserting specified child node as an element
 * of this Array. If index is 0 or less, it will be inserted as
 * the first element; if >= size(), appended at the end, and otherwise
 * inserted before existing element in specified index.
 * No exceptions are thrown for any index.
 *
 * @return This node (to allow chaining)
 */
public ArrayNode insert(int index, JsonNode value)
{
  if (value == null) {
    value = nullNode();
  }
  _insert(index, value);
  return this;
}

代码示例来源:origin: bootique/bootique

@Override
void writeChildValue(String childName, String value) {
  JsonNode childNode = value == null ? node.nullNode() : node.textNode(value);
  writeChild(childName, childNode);
}

代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind

/**
 * Method that will insert a null value
 * at specified position in this array.
 *
 * @return This array node, to allow chaining
 */
public ArrayNode insertNull(int index)
{
  _insert(index, nullNode());
  return this;
}

代码示例来源:origin: Nextdoor/bender

/**
 * Method that will add a null value at the end of this array node.
 *
 * @return This array node, to allow chaining
 */
public ArrayNode addNull()
{
  _add(nullNode());
  return this;
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

/**
 * Method that will add a null value at the end of this array node.
 * 
 * @return This array node, to allow chaining
 */
public ArrayNode addNull()
{
  _add(nullNode());
  return this;
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

/**
 * Method that will insert a null value
 * at specified position in this array.
 * 
 * @return This array node, to allow chaining
 */
public ArrayNode insertNull(int index)
{
  _insert(index, nullNode());
  return this;
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

/**
 * Method that will insert a null value
 * at specified position in this array.
 * 
 * @return This array node, to allow chaining
 */
public ArrayNode insertNull(int index)
{
  _insert(index, nullNode());
  return this;
}

代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind

/**
 * Method that will insert a null value
 * at specified position in this array.
 * 
 * @return This array node, to allow chaining
 */
public ArrayNode insertNull(int index)
{
  _insert(index, nullNode());
  return this;
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

/**
 * Method that will add a null value at the end of this array node.
 * 
 * @return This array node, to allow chaining
 */
public ArrayNode addNull()
{
  _add(nullNode());
  return this;
}

代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind

/**
 * Method that will add a null value at the end of this array node.
 *
 * @return This array node, to allow chaining
 */
public ArrayNode addNull()
{
  _add(nullNode());
  return this;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Method that will insert a null value
 * at specified position in this array.
 * 
 * @return This array node, to allow chaining
 */
public ArrayNode insertNull(int index)
{
  _insert(index, nullNode());
  return this;
}

代码示例来源:origin: Nextdoor/bender

/**
 * Method that will insert a null value
 * at specified position in this array.
 *
 * @return This array node, to allow chaining
 */
public ArrayNode insertNull(int index)
{
  _insert(index, nullNode());
  return this;
}

代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind

/**
 * Method that will add a null value at the end of this array node.
 * 
 * @return This array node, to allow chaining
 */
public ArrayNode addNull()
{
  _add(nullNode());
  return this;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Method that will add a null value at the end of this array node.
 * 
 * @return This array node, to allow chaining
 */
public ArrayNode addNull()
{
  _add(nullNode());
  return this;
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

/**
 * Method for adding specified node at the end of this array.
 * 
 * @return This node, to allow chaining
 */
public ArrayNode add(JsonNode value)
{
  if (value == null) { // let's not store 'raw' nulls but nodes
    value = nullNode();
  }
  _add(value);
  return this;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Method for adding specified node at the end of this array.
 * 
 * @return This node, to allow chaining
 */
public ArrayNode add(JsonNode value)
{
  if (value == null) { // let's not store 'raw' nulls but nodes
    value = nullNode();
  }
  _add(value);
  return this;
}

相关文章