io.sphere.sdk.attributes.ReferenceAttributeMapperImpl Maven / Gradle / Ivy
package io.sphere.sdk.attributes;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import io.sphere.sdk.models.Reference;
import java.util.Optional;
class ReferenceAttributeMapperImpl> extends AttributeMapperImpl {
ReferenceAttributeMapperImpl(final TypeReference typeReference) {
super(typeReference);
}
@Override
public JsonNode serialize(final T t) {
return mapper().valueToTree(t.toReference().filled(Optional.empty()));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy