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

io.sphere.sdk.products.attributes.ReferenceAttributeMapperImpl Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.products.attributes;

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy