Use type adapter factory to hard-set serialization of Credentials.