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

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

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

JsonNodeFactory.rawValueNode介绍

暂无

代码示例

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

@Override
public final ValueNode rawValueNode(RawValue value) { return _nodeFactory.rawValueNode(value); }

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

protected final JsonNode _fromEmbedded(JsonParser p, DeserializationContext ctxt,
      JsonNodeFactory nodeFactory) throws IOException
  {
    Object ob = p.getEmbeddedObject();
    if (ob == null) { // should this occur?
      return nodeFactory.nullNode();
    }
    Class<?> type = ob.getClass();
    if (type == byte[].class) { // most common special case
      return nodeFactory.binaryNode((byte[]) ob);
    }
    // [databind#743]: Don't forget RawValue
    if (ob instanceof RawValue) {
      return nodeFactory.rawValueNode((RawValue) ob);
    }
    if (ob instanceof JsonNode) {
      // [databind#433]: but could also be a JsonNode hiding in there!
      return (JsonNode) ob;
    }
    // any other special handling needed?
    return nodeFactory.pojoNode(ob);
  }
}

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

@Override
public final ValueNode rawValueNode(RawValue value) { return _nodeFactory.rawValueNode(value); }

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

@Override
public final ValueNode rawValueNode(RawValue value) { return _nodeFactory.rawValueNode(value); }

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

protected final JsonNode _fromEmbedded(JsonParser p, DeserializationContext ctxt,
      JsonNodeFactory nodeFactory) throws IOException
  {
    Object ob = p.getEmbeddedObject();
    if (ob == null) { // should this occur?
      return nodeFactory.nullNode();
    }
    Class<?> type = ob.getClass();
    if (type == byte[].class) { // most common special case
      return nodeFactory.binaryNode((byte[]) ob);
    }
    // [databind#743]: Don't forget RawValue
    if (ob instanceof RawValue) {
      return nodeFactory.rawValueNode((RawValue) ob);
    }
    if (ob instanceof JsonNode) {
      // [databind#433]: but could also be a JsonNode hiding in there!
      return (JsonNode) ob;
    }
    // any other special handling needed?
    return nodeFactory.pojoNode(ob);
  }
}

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

protected final JsonNode _fromEmbedded(JsonParser p, DeserializationContext ctxt,
      JsonNodeFactory nodeFactory) throws IOException
  {
    Object ob = p.getEmbeddedObject();
    if (ob == null) { // should this occur?
      return nodeFactory.nullNode();
    }
    Class<?> type = ob.getClass();
    if (type == byte[].class) { // most common special case
      return nodeFactory.binaryNode((byte[]) ob);
    }
    // [databind#743]: Don't forget RawValue
    if (ob instanceof RawValue) {
      return nodeFactory.rawValueNode((RawValue) ob);
    }
    if (ob instanceof JsonNode) {
      // [Issue#433]: but could also be a JsonNode hiding in there!
      return (JsonNode) ob;
    }
    // any other special handling needed?
    return nodeFactory.pojoNode(ob);
  }
}

相关文章