com.github.useful_solutions.tosamara_sdk.classifier.serializer.NumberRoutesSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tosamara-sdk Show documentation
Show all versions of tosamara-sdk Show documentation
SDK for working with API of tosamara.ru on Java
package com.github.useful_solutions.tosamara_sdk.classifier.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.util.List;
public class NumberRoutesSerializer extends JsonSerializer> {
@Override
public void serialize(List strings, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
if (strings != null) {
jsonGenerator.writeString(String.join(", ", strings));
}
}
}