io.sphere.sdk.products.attributes.AttributeMapper Maven / Gradle / Ivy
package io.sphere.sdk.products.attributes;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import io.sphere.sdk.models.LocalizedString;
/**
*
* @param the result type of the attribute, e.g., {@link LocalizedString}
*
*/
public interface AttributeMapper {
T deserialize(final JsonNode value);
JsonNode serialize(final T value);
static AttributeMapper of(final TypeReference typeReference) {
return new AttributeMapperImpl<>(typeReference);
}
}