All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liberologico.cloudesire.cmw.model.serializer.VolumeDeserializer Maven / Gradle / Ivy

The newest version!
package com.liberologico.cloudesire.cmw.model.serializer;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.liberologico.cloudesire.cmw.model.dto.DockerComposeServiceDTO;

import java.io.IOException;

public class VolumeDeserializer extends JsonDeserializer
{
    @Override
    public DockerComposeServiceDTO.Volume deserialize( JsonParser jp, DeserializationContext ctxt ) throws IOException
    {
        String[] pieces = jp.getValueAsString().split( ":" );
        return new DockerComposeServiceDTO.Volume( pieces );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy