
com.plivo.api.serializers.DelimitedListSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plivo-java Show documentation
Show all versions of plivo-java Show documentation
A Java SDK to make voice calls & send SMS using Plivo and to generate Plivo XML
package com.plivo.api.serializers;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.util.List;
public class DelimitedListSerializer extends JsonSerializer> {
private final String delimiter;
DelimitedListSerializer() {
this("<");
}
DelimitedListSerializer(String delimiter) {
this.delimiter = delimiter;
}
@Override
public void serialize(List value, JsonGenerator gen, SerializerProvider serializers)
throws IOException, JsonProcessingException {
gen.writeString(String.join(delimiter, value));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy