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

io.sphere.sdk.attributes.EnumLikeAttributeMapperImpl Maven / Gradle / Ivy

The newest version!
package io.sphere.sdk.attributes;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import io.sphere.sdk.models.WithKey;

class EnumLikeAttributeMapperImpl extends AttributeMapperImpl {
    EnumLikeAttributeMapperImpl(final TypeReference typeReference) {
        super(typeReference);
    }

    @Override
    public JsonNode serialize(final T t) {
        return mapper().valueToTree(t.getKey());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy