withSubtype

open fun withSubtype(subtype: Class<out T>, label: String): PolymorphicJsonAdapterFactory<T>

Returns a new factory that decodes instances of subtype.