
com.xeiam.xchange.ripple.dto.ToPlainStringSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-ripple Show documentation
Show all versions of xchange-ripple Show documentation
XChange implementation for the Ripple Network
The newest version!
package com.xeiam.xchange.ripple.dto;
import java.io.IOException;
import java.math.BigDecimal;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
public class ToPlainStringSerializer extends JsonSerializer {
@Override
public void serialize(final BigDecimal value, final JsonGenerator jgen, final SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeString(value.stripTrailingZeros().toPlainString());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy