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

io.lindstrom.mpd.support.ParserModule Maven / Gradle / Ivy

There is a newer version: 0.13
Show newest version
package io.lindstrom.mpd.support;

import com.fasterxml.jackson.databind.module.SimpleModule;
import io.lindstrom.mpd.data.FrameRate;
import io.lindstrom.mpd.data.Profiles;
import io.lindstrom.mpd.data.Ratio;

import java.time.Duration;
import java.time.OffsetDateTime;

public class ParserModule extends SimpleModule {
    public ParserModule() {
        addDeserializer(Duration.class, new DurationDeserializer());
        addSerializer(Duration.class, new DurationSerializer());

        addDeserializer(OffsetDateTime.class, new OffsetDateTimeDeserializer());
        addSerializer(OffsetDateTime.class, new OffsetDateTimeSerializer());

        addDeserializer(Ratio.class, new RatioDeserializer());
        addSerializer(Ratio.class, new RatioSerializer());

        addDeserializer(FrameRate.class, new FrameRateDeserializer());
        addSerializer(FrameRate.class, new FrameRateSerializer());

        addDeserializer(Profiles.class, new ProfilesDeserializer());
        addSerializer(Profiles.class, new ProfilesSerializer());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy