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

org.knowm.xchange.coinbase.dto.serialization.EnumLowercaseJsonSerializer Maven / Gradle / Ivy

There is a newer version: 5.2.1
Show newest version
package org.knowm.xchange.coinbase.dto.serialization;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;

/** @author jamespedwards42 */
public class EnumLowercaseJsonSerializer extends JsonSerializer> {

  @Override
  public void serialize(Enum value, JsonGenerator jgen, SerializerProvider provider)
      throws IOException, JsonProcessingException {

    jgen.writeString(value.toString().toLowerCase());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy