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

org.opentripplanner.api.json.QualifiedModeSetDeserializer Maven / Gradle / Ivy

package org.opentripplanner.api.json;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import org.opentripplanner.api.parameter.QualifiedModeSet;

import java.io.IOException;

/**
 * Deserialize qualified mode sets from strings.
 */
public class QualifiedModeSetDeserializer extends JsonDeserializer {

    @Override public QualifiedModeSet deserialize(JsonParser jsonParser,
            DeserializationContext deserializationContext)
            throws IOException, JsonProcessingException {
        return new QualifiedModeSet(jsonParser.getValueAsString());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy