com.github.dreamhead.moco.dumper.HttpProtocolVersionSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-core Show documentation
Show all versions of moco-core Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco.dumper;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.github.dreamhead.moco.HttpProtocolVersion;
import java.io.IOException;
public class HttpProtocolVersionSerializer extends JsonSerializer {
@Override
public void serialize(final HttpProtocolVersion value, final JsonGenerator generator,
final SerializerProvider provider) throws IOException {
generator.writeString(value.text());
}
}