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

com.hubspot.algebra.ResultSerializers Maven / Gradle / Ivy

There is a newer version: 1.5
Show newest version
package com.hubspot.algebra;

import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.ser.Serializers;

public class ResultSerializers extends Serializers.Base {
  @Override
  public JsonSerializer findSerializer(SerializationConfig config, JavaType type, BeanDescription beanDesc) {
    final Class raw = type.getRawClass();
    if (Result.class.isAssignableFrom(raw)) {
      return new ResultSerializer(type);
    }

    return null;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy