List of usage examples for com.fasterxml.jackson.databind ObjectMapper canDeserialize
public boolean canDeserialize(JavaType type)
From source file:org.smartdeveloperhub.vocabulary.config.ConfigurationFactory.java
static <T> T convert(final Object source, final Type type) { final ObjectMapper mapper = parsingMapper(); final JavaType constructType = mapper.getTypeFactory().constructType(type); checkArgument(mapper.canDeserialize(constructType), "%s is not a valid configuration class", constructType.toCanonical()); return mapper.convertValue(source, constructType); }