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

com.yahoo.elide.test.graphql.EnumFieldSerializer Maven / Gradle / Ivy

/*
 * Copyright 2019, Yahoo Inc.
 * Licensed under the Apache License, Version 2.0
 * See LICENSE file in project root for terms.
 */
package com.yahoo.elide.test.graphql;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

/**
 * A Jackson serializer for String entity field.
 */
public class EnumFieldSerializer extends JsonSerializer {

    @Override
    public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
            gen.writeRawValue(value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy