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

com.farao_community.farao.cse_valid.api.OffsetDateTimeDeserializer Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2022, RTE (http://www.rte-france.com)
 *  This Source Code Form is subject to the terms of the Mozilla Public
 *  License, v. 2.0. If a copy of the MPL was not distributed with this
 *  file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package com.farao_community.farao.cse_valid.api;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import java.io.IOException;
import java.time.OffsetDateTime;

/**
 * @author Theo Pascoli {@literal }
 */
public class OffsetDateTimeDeserializer extends JsonDeserializer {
    @Override
    public OffsetDateTime deserialize(JsonParser arg0, DeserializationContext arg1) throws IOException {
        return OffsetDateTime.parse(arg0.getText());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy