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

com.github.dreamhead.moco.dumper.MessageContentDeserializer Maven / Gradle / Ivy

Go to download

Moco is an easy setup stub framework, mainly focusing on testing and integration.

There is a newer version: 1.5.0
Show newest version
package com.github.dreamhead.moco.dumper;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.github.dreamhead.moco.model.MessageContent;

import java.io.IOException;

import static com.github.dreamhead.moco.model.MessageContent.content;

public class MessageContentDeserializer extends JsonDeserializer {
    @Override
    public MessageContent deserialize(final JsonParser jp, final DeserializationContext ctx) throws IOException {
        return content(jp.getText());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy