title: decode encoded UTF-8 json text in swift
body: <p>I'm fetching some <code>json</code> data from internet with this code</p>
  <pre class="lang-swift prettyprint-override"><code>facilitiesService.facilitiesServerDataJson(urlToFetch: url_, jsoncompleted: { () in
  let responseData: Data =  self.facilitiesService.UpdateJsonString.data(using: String.Encoding.utf8)!
  let decoder = JSONDecoder()
  let facilityDataListTmp = try decoder.decode([FacilityData].self, from: responseData)
  
  </code></pre>
  <p>which works fine for alphabet, but my <code>json</code> also contains japanese text so my output became like this</p>
  <pre class="lang-json prettyprint-override"><code>nicopass.FacilityData(
  tn_newsid: 999900001,
  tn_midashi: &quot;æºæã®å¤ã«ç¾ããç¥ç§ã®è¹ãã ã¼ã³ãã¦ããè¦ããå¹¸éãè¨ªããï¼è½å·®55mã§åå­£æãã®ç¾ããçµ¶æ¯ãæããåç&quot;
  
  </code></pre>
  <p>As you can see, it works fine for alphabet, but Japanese became some weird characters.
  Im able to decode it here from <code>utf-8</code> to normal text <a href="https://www.browserling.com/tools/utf8-decode" rel="nofollow noreferrer">&gt;&gt;link</a></p>
  <p>But I would like to know how to decode it in the source code.</p>