gpt4 book ai didi

com.evolveum.midpoint.prism.impl.lex.json.YamlLexicalProcessor类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 10:20:31 27 4
gpt4 key购买 nike

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

YamlLexicalProcessor介绍

暂无

代码示例

代码示例来源:origin: Evolveum/midpoint

public LexicalProcessorRegistry(@NotNull SchemaRegistry schemaRegistry) {
  domLexicalProcessor = new DomLexicalProcessor(schemaRegistry);
  nullLexicalProcessor = new NullLexicalProcessor();
  parserMap = new HashMap<>();
  parserMap.put(LANG_XML, domLexicalProcessor);
  parserMap.put(LANG_JSON, new JsonLexicalProcessor(schemaRegistry));
  parserMap.put(LANG_YAML, new YamlLexicalProcessor(schemaRegistry));
}

代码示例来源:origin: Evolveum/midpoint

private ObjectMapper configureMapperForSerialization(){
    ObjectMapper mapper = new ObjectMapper();
    mapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
//        mapper.enableDefaultTyping(DefaultTyping.NON_CONCRETE_AND_ARRAYS, As.EXISTING_PROPERTY);
//        mapper.configure(SerializationFeaCture.);
//        mapper.setSerializationInclusion(Include.NON_NULL);
    mapper.registerModule(createSerializerModule());

    mapper.disableDefaultTyping();

//        mapper.enableDefaultTyping(DefaultTyping.NON_CONCRETE_AND_ARRAYS);
//        mapper.enableDefaultTyping(DefaultTyping.NON_FINAL, As.EXISTING_PROPERTY);
//        //mapper.enableDefaultTyping(DefaultTyping.NON_FINAL, As.EXTERNAL_PROPERTY);
//        mapper.enableDefaultTyping(DefaultTyping.NON_FINAL, As.PROPERTY);

    return mapper;
  }

代码示例来源:origin: Evolveum/midpoint

return null;		// ???
} else if (TAG_INT.equals(tag)) {
  QName type = determineNumberType(ctx.parser.getNumberType());
  if (DOMUtil.XSD_INT.equals(type) || DOMUtil.XSD_INTEGER.equals(type)) {
    return type;
  QName type = determineNumberType(ctx.parser.getNumberType());
  if (DOMUtil.XSD_FLOAT.equals(type) || DOMUtil.XSD_DOUBLE.equals(type) || DOMUtil.XSD_DECIMAL.equals(type)) {
    return type;

代码示例来源:origin: Evolveum/midpoint

public YAMLGenerator createJacksonGenerator(StringWriter out) throws SchemaException{
  try {
    MidpointYAMLFactory factory = new MidpointYAMLFactory();
    MidpointYAMLGenerator generator = (MidpointYAMLGenerator) factory.createGenerator(out);
    generator.setPrettyPrinter(new DefaultPrettyPrinter());
    generator.setCodec(configureMapperForSerialization());
    return generator;
  } catch (IOException ex){
    throw new SchemaException("Schema error during serializing to JSON.", ex);
  }
}

代码示例来源:origin: Evolveum/midpoint

@Override
protected YamlLexicalProcessor createParser() {
  return new YamlLexicalProcessor(PrismTestUtil.getSchemaRegistry());
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com