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

com.casper.sdk.jackson.resolver.KindResolver 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.casper.sdk.jackson.deserializer.KindDeserializer;
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 java.util.Collection;

/**
 * Custom resolver for Kind subtypes.
 *
 * @author [email protected]
 */
public class KindResolver extends StdTypeResolverBuilder {
    @Override
    public TypeDeserializer buildTypeDeserializer(final DeserializationConfig config,
                                                  final JavaType baseType,
                                                  final Collection subtypes) {
        return new KindDeserializer(baseType, null, _typeProperty, _typeIdVisible, baseType);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy