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

com.glookast.commons.timecode.json.TimecodeDeserializer Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package com.glookast.commons.timecode.json;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.glookast.commons.timecode.Timecode;

import java.io.IOException;

public class TimecodeDeserializer extends StdDeserializer
{
    protected TimecodeDeserializer()
    {
        super(Timecode.class);
    }

    @Override
    public Timecode deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException
    {
        return Timecode.valueOf(p.getText());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy