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

de.aipark.api.webservice.jsonConverter.aiparkapi.SimpleKeyDeserializer Maven / Gradle / Ivy

Go to download

AIPARK offers detailed parking information for more than 1.8 Mio parking areas in Germany with nationwide coverage. Additionally, accurate occupancy predictions are derived using data from a network of more than 5 million smartphones. Use the AIPARK API Explorer application to try out and test the interface. Please send a request via email if you are a developer and require an API key. We'll be in touch with you shortly. This application is provided via a demo backend environment. Please note that API load tests do not reflect the performance of the productive system. Mail: [email protected]

The newest version!
package de.aipark.api.webservice.jsonConverter.aiparkapi;

import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.KeyDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;

/**
 * Created by torgen on 25.09.17.
 */
public class SimpleKeyDeserializer extends KeyDeserializer {
    ObjectMapper objectMapper;
    private Class type;

    public SimpleKeyDeserializer() {
        objectMapper = new ObjectMapper();
    }
    @Override
    public T deserializeKey(String key, DeserializationContext ctxt) {

        try {
            return (T)objectMapper.readValue(key,type.getClass());
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy