-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
enhancementjava8Issues related to making Java 8 the minimum supported versionIssues related to making Java 8 the minimum supported version
Description
Problem solved by the feature
Similar to #1700 JsonDeserializationContext
should have a deserialize
overload with TypeToken
parameter to provide type-safety, and the documentation should then recommend that overload.
Feature description
Since JsonDeserializationContext
is an interface and might be implemented by users, the deserialize
overload would have to be implemented as interface default
method. Therefore this has to wait until Gson targets Java 8 or newer.
The default
method could then simply delegate to the other overload, though Gson's internal implementation could override it to directly call Gson.fromJson(..., TypeToken)
.
Maybe it would also be worth considering to deprecate the existing method with Type
parameter, see also #2328.
Metadata
Metadata
Assignees
Labels
enhancementjava8Issues related to making Java 8 the minimum supported versionIssues related to making Java 8 the minimum supported version