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

com.fasterxml.jackson.jr.retrofit2.JacksonJrResponseConverter Maven / Gradle / Ivy

There is a newer version: 2.18.2
Show newest version
package com.fasterxml.jackson.jr.retrofit2;

import com.fasterxml.jackson.jr.ob.JSON;

import okhttp3.ResponseBody;

import java.io.IOException;

import retrofit2.Converter;

public class JacksonJrResponseConverter implements Converter
{
    protected final JSON _jr;
    protected final Class _type;

    public JacksonJrResponseConverter(JSON jr, Class t) {
        _jr = jr;
        _type = t;
    }

    @Override
    public T convert(ResponseBody value) throws IOException {
        return _jr.beanFrom(_type, value.bytes());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy