title: Implementing Google transliterate API using REST and C#, facing unicode and parsing issues
body: <p>I have been trying to use Google Transliterate API using the RESTful approach as its easy to do so through server side language (C# here). </p>
  
  <p>So, I came across this URL format: <a href="http://www.google.com/transliterate/indic?tlqt=1&amp;langpair=en|hi&amp;text=bharat%2Cindia&amp;tl_app=3" rel="nofollow noreferrer">http://www.google.com/transliterate/indic?tlqt=1&amp;langpair=en|hi&amp;text=bharat%2Cindia&amp;tl_app=3</a> which returns the JSON in the format:</p>
  
  <pre><code>[
  {
  "ew" : "bharat",
  "hws" : [
  "भारत","भरत","भरात","भारात","बहरत",
  ]
  },
  {
  "ew" : "india",
  "hws" : [
  "इंडिया","इन्डिया","इण्डिया","ईन्डिया","इनडिया",
  ]
  },
  ] 
  </code></pre>
  
  <p>I tried <code>HttpWebRequest</code> and <code>HttpWebResponse</code> to get the JSON but it returned values in Unicode on the web browser, such as:</p>
  
  <pre><code>[ { "ew" : "bharat", "hws" : [ "\u092D\u093E\u0930\u0924","\u092D\u0930\u0924","\u092D\u0930\u093E\u0924","\u092D\u093E\u0930\u093E\u0924","\u092C\u0939\u0930\u0924", ] }, { "ew" : "india", "hws" : [ "\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0928\u094D\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u0908\u0928\u094D\u0921\u093F\u092F\u093E","\u0907\u0928\u0921\u093F\u092F\u093E", ] }, ]
  </code></pre>
  
  <p>So, I applied this <a href="https://stackoverflow.com/questions/1615559/converting-unicode-strings-to-escaped-ascii-string">article</a> and passed the JSON <strong>string</strong> via it, and it returned: </p>
  
  <pre><code>[ { "ew" : "bharat", "hws" : [ "भारत","भरत","भरात","भारात","बहरत", ] }, { "ew" : "india", "hws" : [ "इंडिया","इन्डिया","इण्डिया","ईन्डिया","इनडिया", ] }, ]
  </code></pre>
  
  <p><strong>FIRST QUESTION</strong>: Am I doing it right so far? Because in the browser it DOES NOT show the last <code>" ] "</code>, however <code>" ] "</code> exists in the HTML source (not sure why that happened). Also, when I try to parse it, using (I might be wrong using this technique):</p>
  
  <pre><code>var jss = new JavaScriptSerializer();
  var dict = jss.Deserialize&lt;Dictionary&lt;string, dynamic&gt;&gt;(the_JSON_string);
  </code></pre>
  
  <p>Its giving me error saying:</p>
  
  <pre><code>Invalid array passed in, extra trailing ','.
  </code></pre>
  
  <p><strong>SECOND QUESTION</strong>: If I am doing right so far, can I get some help <em>parsing the Hindi words</em>? What approach should I take using preferably <code>System.Web.Script.Serialization;</code>. Eventually I want to grab the Hindi text for further processing. </p>
  
  <p>Please help, thanks. </p>