com.casper.sdk.jackson.resolver.KindResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of casper-java-sdk Show documentation
Show all versions of casper-java-sdk Show documentation
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);
}
}