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