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

com.cloudbees.api.cr.CloudResourceSerializer Maven / Gradle / Ivy

package com.cloudbees.api.cr;

import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;

import java.io.IOException;

/**
 * @author Kohsuke Kawaguchi
 */
class CloudResourceSerializer extends JsonSerializer {
    @Override
    public Class handledType() {
        return CloudResource.class;
    }

    @Override
    public void serialize(CloudResource value, JsonGenerator jgen, SerializerProvider provider) throws IOException {
        jgen.writeString(value.getUrl().toExternalForm());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy