问题
I am referring to the Google.Apis.Admin.Directory.directory_v1.Data.User
type.
The property type of Addresses
, for example, in beta versions (i.e. 1.7 and older) was
public virtual System.Collections.Generic.IList<UserAddress> Addresses { get; set; }
In later versions (currently 1.9.1), they are all of type object.
public virtual object Addresses { get; set; }
What are the reasons behind the change and usage scenarios?
I trawled the release notes, the web, google group, SO, etc. and found no explanation on this.
回答1:
A change to the backend had the unintended consequence of changing the discovery document for the service, making the addresses field (and others) being marked as type=any. This causes problems for strongly types languages like .NET, as you've found. The team is aware of the issue but it's unclear when a fix will be available.
来源:https://stackoverflow.com/questions/29620274/why-is-type-of-these-user-properties-object-addresses-emails-organizations-e