nl.vpro.domain.media.bind.BroadcasterListToJson Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of media-domain Show documentation
Show all versions of media-domain Show documentation
The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it.
It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.
package nl.vpro.domain.media.bind;
import java.io.IOException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import nl.vpro.domain.bind.AbstractJsonIterable;
import nl.vpro.domain.user.Broadcaster;
/**
* Used to let the broadcaster list in the MediaObject json be just an array of strings (see MSE-1267)
* @author Michiel Meeuwissen
*/
public class BroadcasterListToJson extends AbstractJsonIterable.Serializer {
@Override
protected void serializeValue(Broadcaster value, JsonGenerator jgen, SerializerProvider serializerProvider) throws IOException {
jgen.writeString(value.getDisplayName());
}
}