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
{{ message }}
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.
When the Gson's native fromJson method returns null (ex. when the JSON string is empty), a
java.lang.IllegalStateException: fromJson(json, typeToken<T>()) must not be null
exception is thrown due to the extension function being defined as Gson.fromJson(json: String): T. I developed a workaround for it (note the nullable type T)
When the Gson's native
fromJson
method returnsnull
(ex. when the JSON string is empty), aexception is thrown due to the extension function being defined as
Gson.fromJson(json: String): T
. I developed a workaround for it (note the nullable type T)I'm unsure whether this would be the correct approach, thus I'm not submitting a PR.
The text was updated successfully, but these errors were encountered: