org.nd4j.shade.jackson.databind.ObjectMapper.copy()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(161)

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

ObjectMapper.copy介绍

暂无

代码示例

代码示例来源:origin: org.deeplearning4j/deeplearning4j-nn

/**
 * Reinitialize and return the Jackson/json ObjectMapper with additional named types.
 * This can be used to add additional subtypes at runtime (i.e., for JSON mapping with
 * types defined outside of the main DL4J codebase)
 */
public static ObjectMapper reinitMapperWithSubtypes(Collection<NamedType> additionalTypes) {
  mapper.registerSubtypes(additionalTypes.toArray(new NamedType[additionalTypes.size()]));
  //Recreate the mapper (via copy), as mapper won't use registered subtypes after first use
  mapper = mapper.copy();
  return mapper;
}

代码示例来源:origin: org.datavec/datavec-data-image

mapper = mapper.copy();
return mapper;

相关文章