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

org.eclipse.digitaltwin.basyx.http.StandardizedLiteralEnumSerializer Maven / Gradle / Ivy

package org.eclipse.digitaltwin.basyx.http;

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 org.eclipse.digitaltwin.basyx.core.StandardizedLiteralEnum;

import java.io.IOException;

public class StandardizedLiteralEnumSerializer extends JsonSerializer {

  @Override
  public void serialize(T value, JsonGenerator jgen, SerializerProvider provider)
      throws IOException, JsonProcessingException {
    jgen.writeString(value.getValue());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy