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

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

The newest version!
package com.fasterxml.jackson.jr.retrofit2;

import java.io.IOException;
import java.util.List;

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

import okhttp3.ResponseBody;

import retrofit2.Converter;

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

    public JacksonJrResponseArrayConverter(JSON jr, Class type) {
        _jr = jr;
        _type = type;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy