mechanism to support deserialisation of generic types