line21c / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

Json parsing issues for UrlShortener #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The CodeGen'ed API is currently unable to parse the URL response of a Get URL 
request:

 System.ApplicationException: Failed to generate object of type[Url] from Json[{
 "kind": "urlshortener#url",
 "id": "http://goo.gl/hcEg7",
 "longUrl": "http://google.com/",
 "status": "OK"
}
] ---> System.ApplicationException: Failed to get response from stream, error 
was []
   at Google.Apis.UrlshortenerService.JsonToObject[TOutput](Stream stream)   in URLShortener.v1.cs:line 231
   --- End of inner exception stack trace ---
   at Google.Apis.UrlshortenerService.JsonToObject[TOutput](Stream stream) in URLShortener.v1.cs:line 238
   at Google.Apis.Url.GetAsObject(String shortUrl, String projection) in  URLShortener.v1.cs:line 309

Original issue reported on code.google.com by mlin...@google.com on 1 Jun 2011 at 3:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This is caused by the fact that the current version of the library only 
supports the legacy format of parsing responses (data encapsulated within a 
"data" response). This behaviour is no longer common, and should only be used 
when the "dataWrapper" feature is specified.

Original comment by mlin...@google.com on 1 Jun 2011 at 8:08

GoogleCodeExporter commented 9 years ago

Original comment by mlin...@google.com on 8 Jun 2011 at 10:23