com.treasuredata.client.model.StringToNumberSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of td-client Show documentation
Show all versions of td-client Show documentation
Treasure Data Client for Java.
package com.treasuredata.client.model;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
class StringToNumberSerializer
extends StdSerializer
{
public StringToNumberSerializer()
{
super(String.class);
}
@Override
public void serialize(String s, JsonGenerator jsonGenerator, SerializerProvider serializerProvider)
throws IOException
{
jsonGenerator.writeNumber(Integer.parseInt(s));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy