You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case where you are the one creating the JsonReader there's no opportunity to assert completion since you may just be deserializing part of the whole document.
Say I have a class:
final class MyType {}
and a
TypeAdapter
:Note the missing
in.endObject()
call.My calling code:
The above will correctly fail (
JsonIOException: JSON document was not fully consumed.
).However, using a
JsonReader
instead (gson.fromJson(new JsonReader(stringReader), MyType.class)
) will not fail.Is this working as intended?
The text was updated successfully, but these errors were encountered: