public class CryptoTradePairsDeserializer extends JsonDeserializer<Map<CurrencyPair, CryptoTradePair>> {
@Override
public Map<CurrencyPair, CryptoTradePair> deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
final ObjectCodec oc = jp.getCodec();
final JsonNode rootNode = oc.readTree(jp);
final ArrayNode currencyPairs = (ArrayNode) rootNode.path("currency_pairs");
final ArrayNode securityPairs = (ArrayNode) rootNode.path("security_pairs");
final Map<CurrencyPair, CryptoTradePair> pairs = new HashMap<CurrencyPair, CryptoTradePair>();
for (JsonNode pairInfo : currencyPairs) {