Added support for deserialization based on TypeToken.