com.fasterxml.jackson.databind.ObjectMapper._newReader()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(89)

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

ObjectMapper._newReader介绍

[英]Factory method sub-classes must override, to produce ObjectReaderinstances of proper sub-type
[中]工厂方法子类必须重写,以生成正确子类型的ObjectReaderInstance

代码示例

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * read or update instances of specified type
 * 
 * @since 2.6
 */
public ObjectReader readerFor(JavaType type) {
  return _newReader(getDeserializationConfig(), type, null,
      null, _injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * use specified injectable values.
 * 
 * @param injectableValues Injectable values to use
 */
public ObjectReader reader(InjectableValues injectableValues) {
  return _newReader(getDeserializationConfig(), null, null,
      null, injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * read or update instances of specified type
 * 
 * @since 2.6
 */
public ObjectReader readerFor(TypeReference<?> type) {
  return _newReader(getDeserializationConfig(), _typeFactory.constructType(type), null,
      null, _injectableValues);
}

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

/**
 * @deprecated Since 2.5, use {@link #readerFor(JavaType)} instead
 */
@Deprecated
public ObjectReader reader(JavaType type) {
  return _newReader(getDeserializationConfig(), type, null,
      null, _injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * read or update instances of specified type
 * 
 * @since 2.6
 */
public ObjectReader readerFor(Class<?> type) {
  return _newReader(getDeserializationConfig(), _typeFactory.constructType(type), null,
      null, _injectableValues);
}

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

/**
 * @deprecated Since 2.5, use {@link #readerFor(Class)} instead
 */
@Deprecated
public ObjectReader reader(Class<?> type) {
  return _newReader(getDeserializationConfig(), _typeFactory.constructType(type), null,
      null, _injectableValues);
}

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

/**
 * @deprecated Since 2.5, use {@link #readerFor(TypeReference)} instead
 */
@Deprecated
public ObjectReader reader(TypeReference<?> type) {
  return _newReader(getDeserializationConfig(), _typeFactory.constructType(type), null,
      null, _injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * update given Object (usually Bean, but can be a Collection or Map
 * as well, but NOT an array) with JSON data. Deserialization occurs
 * normally except that the root-level value in JSON is not used for
 * instantiating a new object; instead give updateable object is used
 * as root.
 * Runtime type of value object is used for locating deserializer,
 * unless overridden by other factory methods of {@link ObjectReader}
 */
public ObjectReader readerForUpdating(Object valueToUpdate) {
  JavaType t = _typeFactory.constructType(valueToUpdate.getClass());
  return _newReader(getDeserializationConfig(), t, valueToUpdate,
      null, _injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * pass specific schema object to {@link JsonParser} used for
 * reading content.
 * 
 * @param schema Schema to pass to parser
 */
public ObjectReader reader(FormatSchema schema) {
  _verifySchemaType(schema);
  return _newReader(getDeserializationConfig(), null, null,
      schema, _injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} with
 * default settings. Note that the resulting instance is NOT usable as is,
 * without defining expected value type.
 */
public ObjectReader reader() {
  return _newReader(getDeserializationConfig()).with(_injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} with
 * specified feature enabled (compared to settings that this
 * mapper instance has).
 * Note that the resulting instance is NOT usable as is,
 * without defining expected value type.
 */
public ObjectReader reader(DeserializationFeature feature) {
  return _newReader(getDeserializationConfig().with(feature));
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * use specified Base64 encoding variant for Base64-encoded binary data.
 * 
 * @since 2.1
 */
public ObjectReader reader(Base64Variant defaultBase64) {
  return _newReader(getDeserializationConfig().with(defaultBase64));
}

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

/**
 * Factory method for constructing {@link ObjectReader} with
 * specified features enabled (compared to settings that this
 * mapper instance has).
 * Note that the resulting instance is NOT usable as is,
 * without defining expected value type.
 */
public ObjectReader reader(DeserializationFeature first,
    DeserializationFeature... other) {
  return _newReader(getDeserializationConfig().with(first, other));
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * use specified {@link JsonNodeFactory} for constructing JSON trees.
 */
public ObjectReader reader(JsonNodeFactory f) {
  return _newReader(getDeserializationConfig()).with(f);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * deserialize objects using specified JSON View (filter).
 */
public ObjectReader readerWithView(Class<?> view) {
  return _newReader(getDeserializationConfig().withView(view));
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * use specified default attributes.
 * 
 * @since 2.3
 */
public ObjectReader reader(ContextAttributes attrs) {
  return _newReader(getDeserializationConfig().with(attrs));
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * read or update instances of specified type
 *
 * @since 2.6
 */
public ObjectReader readerFor(JavaType type) {
  return _newReader(getDeserializationConfig(), type, null,
      null, _injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * read or update instances of specified type
 */
@SuppressWarnings("unchecked")
public <T extends ObjectReader> T reader(JavaType type) {
  return (T) _newReader(getDeserializationConfig(), type, null,
      null, _injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * use specified injectable values.
 * 
 * @param injectableValues Injectable values to use
 */
public ObjectReader reader(InjectableValues injectableValues) {
  return _newReader(getDeserializationConfig(), null, null,
      null, injectableValues);
}

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

/**
 * Factory method for constructing {@link ObjectReader} that will
 * use specified injectable values.
 *
 * @param injectableValues Injectable values to use
 */
public ObjectReader reader(InjectableValues injectableValues) {
  return _newReader(getDeserializationConfig(), null, null,
      null, injectableValues);
}

相关文章

微信公众号

最新文章

更多

ObjectMapper类方法