contextualSerializer
Retrieves a contextual serializer for the given T and, if T is not registered for contextual serialization, falls back to the default serializer.
This overload works with full type information, including type arguments and nullability. Variance of T's arguments is not taken into account. Star projections are prohibited.
Throws
if a serializer cannot be created.
if any of T's arguments contains a star projection.
Retrieves a contextual serializer for the given type and, if type is not registered for contextual serialization, falls back to the default serializer.
This overload works with full type information, including type arguments and nullability. Variance of type's arguments is not taken into account. Star projections are prohibited.
Throws
if a serializer cannot be created.
if any of type's arguments contains a star projection.