com.arangodb.internal.serde.InternalMapperProvider Maven / Gradle / Ivy
package com.arangodb.internal.serde;
import com.arangodb.ContentType;
import com.arangodb.shaded.fasterxml.jackson.databind.ObjectMapper;
import java.util.function.Supplier;
public interface InternalMapperProvider extends Supplier {
static ObjectMapper of(final ContentType contentType) {
if (contentType == ContentType.JSON) {
return InternalJsonMapperProvider.INSTANCE.get();
} else if (contentType == ContentType.VPACK) {
return InternalVPackMapperProvider.INSTANCE.get();
} else {
throw new IllegalArgumentException("Unexpected value: " + contentType);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy