
io.determan.jschema.helper.jackon.YamlHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jschema-helper Show documentation
Show all versions of jschema-helper Show documentation
Json-Schema Databind for Jackson
The newest version!
package io.determan.jschema.helper.jackon;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
public class YamlHelper {
public static ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
mapper.addHandler(new AdditionalPropertiesDeserialization());
mapper.configure(DeserializationFeature.USE_JAVA_ARRAY_FOR_JSON_ARRAY, true);
return mapper;
}
}