asifshaon / 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

Exception when parsing translation result for html code #177

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the api to translate some text with html markup like "<b>Hello</b>"
2.
3.

What is the expected output?
The translation with all the markup intact.

What do you see instead?
A GoogleApiRequestException "<null>"
   en Google.Apis.Requests.Request.AsyncRequestResult.GetResponse()
   en Google.Apis.Requests.ServiceRequest`1.GetResponse()
   en Google.Apis.Requests.ServiceRequest`1.Fetch()

The inner exception shows what's happening.

   [Newtonsoft.Json.JsonReaderException] = {"Unexpected character encountered while parsing value: <. Line 1, position 1."}

What version of the product are you using? On what operating system?
1.1.4344 (Windows 7 32bit)

Please provide any additional information below.

Original issue reported on code.google.com by albertm...@gmail.com on 2 Jan 2012 at 2:45

GoogleCodeExporter commented 9 years ago
any news on this?
We have this issue on a live website and I have no time now to investigate this 
further.
Without a fix to this issue this Api is effectively useless.
So could you increase the priority to the maximum? 
Medium seems too low.

Original comment by marcodeg...@gmail.com on 18 Apr 2012 at 12:28

GoogleCodeExporter commented 9 years ago
Try using the FetchAsStream() instead of Fetch()and read the response directly 
instead of attempting to parse it as JSON.

Original comment by asky...@google.com on 25 Apr 2012 at 6:28

GoogleCodeExporter commented 9 years ago
Issue 192 has been merged into this issue.

Original comment by asky...@google.com on 25 Apr 2012 at 6:30