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());
}
}