package com.sifang.modules.factory.aiswei.util;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;

public class AisweiObjectMapper extends ObjectMapper {

    @Override
    public <T> T readValue(String content, TypeReference valueTypeRef) {
        try {
            return super.readValue(content, valueTypeRef);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public AisweiObjectMapper configure(DeserializationFeature f, boolean state) {
        super.configure(f, state);
        return this;
    }

}
