本文整理了Java中com.fasterxml.jackson.dataformat.yaml.YAMLFactory.enable()
方法的一些代码示例,展示了YAMLFactory.enable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAMLFactory.enable()
方法的具体详情如下:
包路径:com.fasterxml.jackson.dataformat.yaml.YAMLFactory
类名称:YAMLFactory
方法名:enable
[英]Method for enabling specified generator features (check YAMLGenerator.Feature for list of features)
[中]启用指定生成器功能的方法(检查YAMLGenerator.Feature以获取功能列表)
代码示例来源:origin: redisson/redisson
public YAMLMapper enable(YAMLParser.Feature f) {
((YAMLFactory)_jsonFactory).enable(f);
return this;
}
代码示例来源:origin: redisson/redisson
public YAMLMapper enable(YAMLGenerator.Feature f) {
((YAMLFactory)_jsonFactory).enable(f);
return this;
}
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
public YAMLMapper enable(YAMLParser.Feature f) {
((YAMLFactory)_jsonFactory).enable(f);
return this;
}
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
public YAMLMapper enable(YAMLGenerator.Feature f) {
((YAMLFactory)_jsonFactory).enable(f);
return this;
}
代码示例来源:origin: swagger-api/swagger-core
protected static ObjectMapper createYaml() {
YAMLFactory factory = new YAMLFactory();
factory.disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER);
factory.enable(YAMLGenerator.Feature.MINIMIZE_QUOTES);
factory.enable(YAMLGenerator.Feature.SPLIT_LINES);
factory.enable(YAMLGenerator.Feature.ALWAYS_QUOTE_NUMBERS_AS_STRINGS);
return create(factory);
}
代码示例来源:origin: redisson/redisson
/**
* Method for enabling or disabling specified generator feature
* (check {@link YAMLGenerator.Feature} for list of features)
*/
public final YAMLFactory configure(YAMLGenerator.Feature f, boolean state) {
if (state) {
enable(f);
} else {
disable(f);
}
return this;
}
代码示例来源:origin: redisson/redisson
/**
* Method for enabling or disabling specified parser feature
* (check {@link YAMLParser.Feature} for list of features)
*/
public final YAMLFactory configure(YAMLParser.Feature f, boolean state)
{
if (state) {
enable(f);
} else {
disable(f);
}
return this;
}
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
/**
* Method for enabling or disabling specified parser feature
* (check {@link YAMLParser.Feature} for list of features)
*/
public final YAMLFactory configure(YAMLParser.Feature f, boolean state)
{
if (state) {
enable(f);
} else {
disable(f);
}
return this;
}
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
/**
* Method for enabling or disabling specified generator feature
* (check {@link YAMLGenerator.Feature} for list of features)
*/
public final YAMLFactory configure(YAMLGenerator.Feature f, boolean state) {
if (state) {
enable(f);
} else {
disable(f);
}
return this;
}
代码示例来源:origin: io.swagger.core.v3/swagger-core
protected static ObjectMapper createYaml() {
YAMLFactory factory = new YAMLFactory();
factory.disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER);
factory.enable(YAMLGenerator.Feature.MINIMIZE_QUOTES);
factory.enable(YAMLGenerator.Feature.SPLIT_LINES);
factory.enable(YAMLGenerator.Feature.ALWAYS_QUOTE_NUMBERS_AS_STRINGS);
return create(factory);
}
代码示例来源:origin: com.atlassian.swagger/atlassian-swagger-doclet
protected static ObjectMapper createYaml() {
YAMLFactory factory = new YAMLFactory();
factory.disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER);
factory.enable(YAMLGenerator.Feature.MINIMIZE_QUOTES);
factory.enable(YAMLGenerator.Feature.SPLIT_LINES);
factory.enable(YAMLGenerator.Feature.ALWAYS_QUOTE_NUMBERS_AS_STRINGS);
return create(factory);
}
代码示例来源:origin: de.taimos/dvalin-jaxrs
public static ObjectMapper createDefaultYaml() {
YAMLFactory factory = new YAMLFactory();
factory.disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER);
factory.enable(YAMLGenerator.Feature.MINIMIZE_QUOTES);
factory.enable(YAMLGenerator.Feature.SPLIT_LINES);
factory.enable(YAMLGenerator.Feature.ALWAYS_QUOTE_NUMBERS_AS_STRINGS);
ObjectMapper m = new ObjectMapper(factory);
m.registerModule(new JodaModule());
m.registerModule(new GuavaModule());
m.setSerializationInclusion(Include.NON_NULL);
m.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
m.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
m.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
m.enable(MapperFeature.AUTO_DETECT_GETTERS);
return m;
}
代码示例来源:origin: com.walmartlabs.concord/concord-project-model
public YamlParser() {
ObjectMapper om = new ObjectMapper(new YAMLFactory()
.enable(JsonParser.Feature.STRICT_DUPLICATE_DETECTION));
SimpleModule module = new SimpleModule();
module.addDeserializer(YamlStep.class, YamlDeserializers.getYamlStepDeserializer());
module.addDeserializer(YamlFormField.class, YamlDeserializers.getYamlFormFieldDeserializer());
module.addDeserializer(YamlDefinitionFile.class, YamlDeserializers.getYamlDefinitionFileDeserializer());
module.addDeserializer(YamlTrigger.class, YamlDeserializers.getYamlTriggerDeserializer());
om.registerModule(module);
this.objectMapper = om;
}
内容来源于网络,如有侵权,请联系作者删除!