本文整理汇总了Java中com.fasterxml.jackson.core.JsonGenerator.Feature方法的典型用法代码示例。如果您正苦于以下问题:Java JsonGenerator.Feature方法的具体用法?Java JsonGenerator.Feature怎么用?Java JsonGenerator.Feature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.fasterxml.jackson.core.JsonGenerator
的用法示例。
在下文中一共展示了JsonGenerator.Feature方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureFeature
import com.fasterxml.jackson.core.JsonGenerator; //导入方法依赖的package包/类
private void configureFeature(ObjectMapper objectMapper, Object feature, boolean enabled) {
if (feature instanceof JsonParser.Feature) {
objectMapper.configure((JsonParser.Feature) feature, enabled);
}
else if (feature instanceof JsonGenerator.Feature) {
objectMapper.configure((JsonGenerator.Feature) feature, enabled);
}
else if (feature instanceof SerializationFeature) {
objectMapper.configure((SerializationFeature) feature, enabled);
}
else if (feature instanceof DeserializationFeature) {
objectMapper.configure((DeserializationFeature) feature, enabled);
}
else if (feature instanceof MapperFeature) {
objectMapper.configure((MapperFeature) feature, enabled);
}
else {
throw new FatalBeanException("Unknown feature class: " + feature.getClass().getName());
}
}
示例2: configureFeature
import com.fasterxml.jackson.core.JsonGenerator; //导入方法依赖的package包/类
private void configureFeature(Object feature, boolean enabled) {
if (feature instanceof JsonParser.Feature) {
this.objectMapper.configure((JsonParser.Feature) feature, enabled);
}
else if (feature instanceof JsonGenerator.Feature) {
this.objectMapper.configure((JsonGenerator.Feature) feature, enabled);
}
else if (feature instanceof SerializationFeature) {
this.objectMapper.configure((SerializationFeature) feature, enabled);
}
else if (feature instanceof DeserializationFeature) {
this.objectMapper.configure((DeserializationFeature) feature, enabled);
}
else if (feature instanceof MapperFeature) {
this.objectMapper.configure((MapperFeature) feature, enabled);
}
else {
throw new FatalBeanException("Unknown feature class: " + feature.getClass().getName());
}
}
示例3: create
import com.fasterxml.jackson.core.JsonGenerator; //导入方法依赖的package包/类
public static JsonGeneratorFeatureFlag create(JsonGenerator.Feature feature, Boolean isEnabled) {
return new AutoValue_JsonGeneratorFeatureFlag(feature, isEnabled);
}
示例4: feature
import com.fasterxml.jackson.core.JsonGenerator; //导入方法依赖的package包/类
public abstract JsonGenerator.Feature feature();