Merge pull request #227 from serj-lotutovici/sl/know_your_factory

Make JsonReaderFactory implement toString().
This commit is contained in:
Jesse Wilson
2017-01-22 06:26:04 -08:00
committed by GitHub

View File

@@ -26,6 +26,10 @@ abstract class JsonReaderFactory {
Buffer buffer = new Buffer().writeUtf8(json);
return JsonReader.of(buffer);
}
@Override public String toString() {
return "BufferedSourceJsonReader";
}
};
public static final JsonReaderFactory JSON_OBJECT = new JsonReaderFactory() {
@@ -34,6 +38,10 @@ abstract class JsonReaderFactory {
Object object = moshi.adapter(Object.class).lenient().fromJson(json);
return new ObjectJsonReader(object);
}
@Override public String toString() {
return "ObjectJsonReader";
}
};
static List<Object[]> factories() {