All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arangodb.internal.serde.InternalMapperProvider Maven / Gradle / Ivy

There is a newer version: 7.13.0
Show newest version
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