【发布时间】:2015-05-16 18:52:38
【问题描述】:
我有一个非常简单的程序来使用Google Discovery API。但是,当我尝试使用 getRest 调用时,它会失败,如下所示。有任何想法吗?我正在使用来自 NuGet VS 2012 Pro 的最新版本的 Discovery API。
DiscoveryService service = new DiscoveryService(new Google.Apis.Services.BaseClientService.Initializer());
//this works no problem
service.Apis.List().Execute();
//this works on the API reference page's Try It! area, but fails here
service.Apis.GetRest("admin", "directory_v1").Execute();
这是在 Google.Apis.Requests.ClientServiceRequest 类中引发的错误,在 Execute() 方法上 - 第 96 行:
JsonSerializationException 未处理
在 JSON 参考对象中发现的其他内容。 JSON 引用对象应该只有一个 $ref 属性。路径'schemas.User.properties.name.description',第 1251 行,位置 20。
【问题讨论】:
标签: c# google-api google-api-client google-api-dotnet-client