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

com.casper.sdk.jackson.resolver.StoredValueResolver Maven / Gradle / Ivy

Go to download

SDK to streamline the 3rd party Java client integration processes. Such 3rd parties include exchanges & app developers.

The newest version!
package com.casper.sdk.jackson.resolver;

import com.fasterxml.jackson.databind.DeserializationConfig;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.jsontype.NamedType;
import com.fasterxml.jackson.databind.jsontype.TypeDeserializer;
import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder;
import com.casper.sdk.jackson.deserializer.StoredValueDeserializer;
import com.casper.sdk.model.clvalue.AbstractCLValue;

import java.util.Collection;

/**
 * Specification of the Custom Type Resolver for CLValue subtype identification.
 * This is used by jackson with the @JsonTypeResolver decorator
 *
 * @author Alexandre Carvalho
 * @author Andre Bertolace
 * @see AbstractCLValue
 * @since 0.0.1
 */
public class StoredValueResolver extends StdTypeResolverBuilder {
    @Override
    public TypeDeserializer buildTypeDeserializer(final DeserializationConfig config, final JavaType baseType,
                                                  final Collection subtypes) {
        return new StoredValueDeserializer(baseType, null, _typeProperty, _typeIdVisible, baseType);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy