001package org.gbif.api.jackson;
002
003import org.gbif.api.vocabulary.Extension;
004
005import java.io.IOException;
006
007import org.codehaus.jackson.map.DeserializationContext;
008import org.codehaus.jackson.map.KeyDeserializer;
009
010
011/**
012 * Deserializer for {@link Extension} in key values.
013 */
014public class ExtensionKeyDeserializer extends KeyDeserializer {
015
016  @Override
017  public Object deserializeKey(String key, DeserializationContext ctxt) throws IOException {
018    return Extension.fromRowType(key);
019  }
020}