com.github.nmorel.gwtjackson.client.ser.CharacterJsonSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gwt-jackson Show documentation
Show all versions of gwt-jackson Show documentation
gwt-jackson is a GWT JSON serializer/deserializer mechanism based on Jackson annotations
package com.github.nmorel.gwtjackson.client.ser;
import javax.annotation.Nonnull;
import java.io.IOException;
import com.github.nmorel.gwtjackson.client.JsonSerializationContext;
import com.github.nmorel.gwtjackson.client.JsonSerializer;
import com.github.nmorel.gwtjackson.client.stream.JsonWriter;
/**
* Default {@link JsonSerializer} implementation for {@link Character}.
*
* @author Nicolas Morel
*/
public class CharacterJsonSerializer extends JsonSerializer {
private static final CharacterJsonSerializer INSTANCE = new CharacterJsonSerializer();
/**
* @return an instance of {@link CharacterJsonSerializer}
*/
public static CharacterJsonSerializer getInstance() {
return INSTANCE;
}
private CharacterJsonSerializer() { }
@Override
public void doSerialize( JsonWriter writer, @Nonnull Character value, JsonSerializationContext ctx ) throws IOException {
writer.value( value.toString() );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy