mirror of
https://github.com/fankes/moshi.git
synced 2025-10-20 00:19:21 +08:00
Merge pull request #227 from serj-lotutovici/sl/know_your_factory
Make JsonReaderFactory implement toString().
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user