Skip to content

Instantly share code, notes, and snippets.

View steffandroid's full-sized avatar

Steffan Davies steffandroid

View GitHub Profile
@steffandroid
steffandroid / ImmutableListAdapter.java
Created June 9, 2016 02:31
A Moshi type adapter factory for Guava's ImmutableList
import com.google.common.collect.ImmutableList;
import com.squareup.moshi.JsonAdapter;
import com.squareup.moshi.JsonReader;
import com.squareup.moshi.JsonWriter;
import com.squareup.moshi.Moshi;
import com.squareup.moshi.Types;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;