title: How to decode json with non-ascii character?
body: <p>I have a json file with non-ascii character in it. I'm trying to retrieve few fields that have non-ascii character but I'm getting key errors.</p>
  
  <p>I tried this <a href="https://stackoverflow.com/questions/30444811/encoding-and-then-decoding-json-with-non-ascii-characters-in-python-2-7">SO question</a> but it didn't helped. I got <code>UnicodeEncodeError</code> error.</p>
  
  <p>The JSON is:</p>
  
  <pre><code>{"Sh\u012bn\u1e0fan\u1e0f": "1","Shibirgh\u0101n": "2", "Khawr Fakk\u0101n": "3", "Sharjah": "4", "Ras al-Khaimah": "5", "Sang-e Ch\u0101rak": "6"}
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>my_dict.update({city.encode("utf-8"):id})
  fobj = open("my.json",'a',0)        
  json.dump(m_dict,fobj)
  fobj.close()
  </code></pre>
  
  <p>To read the json:</p>
  
  <pre><code>with io.open('my.json',encoding='utf-8') as data_file:    
      data = json.loads(data_file.read())
      print data[u"Shibirghān".encode("utf-8")]
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>KeyError: 'Shibirgh\xc4\x81n
  </code></pre>