registerTypeAdapter() now handles JsonSerializer and JsonDeserializer using reified types.
Instead of having this construct GsonBuilder().registerTypeAdapter<MyClass>(jsonDeserializer { MyClass() }) we can infer the type of the Deserializer (or Serializer) GsonBuilder().registerTypeAdapter(jsonDeserializer { MyClass() })
This becomes particularly useful when the Serializer is defined somewhere else because the Serializer that is already typed needs to be registered with the type specified again
registerTypeAdapter()
now handlesJsonSerializer
andJsonDeserializer
using reified types.Instead of having this construct
GsonBuilder().registerTypeAdapter<MyClass>(jsonDeserializer { MyClass() })
we can infer the type of the Deserializer (or Serializer)GsonBuilder().registerTypeAdapter(jsonDeserializer { MyClass() })
This becomes particularly useful when the Serializer is defined somewhere else because the Serializer that is already typed needs to be registered with the type specified again