iOS swift 解析json出现乱码

{
CI1 = 1;
CI2 = 3;
CI3 = 6;
CI4 = 8;
CI5 = 9;
CI6 = 12;
CN1 = "14(1)";
CN2 = "13(1)";
CN3 = "13(2)";
CN4 = "13(4)";
CN5 = "12(4)";
CN6 = "12(1)";
GID1 = 13;
GID2 = 12;
GN1 = "\U6570\U5b66";
GN2 = "\U7269\U7406";
KEY = CGGpLHs;
KN = "\U963f\U65af\U8482\U82ac";
KS = 1;
SC = 0;
SUP = Y;
TN = "\U8c2d\U52b2";
tID = 1;
}解析的结果,原本是字符串的数据都变成了乱码,例如kn和tn的数据原本是汉字,现在都成编码了。
使用的是这个解析方式
http.post(url, mapPair: dict, completionHandler: {(data: NSData?, error: NSError?) -> Void in

        if (error != nil){

        println("error=\(error!.localizedDescription)")

        }else{

             let jsonDictionary: NSDictionary = NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.MutableContainers, error: nil) as! NSDictionary

              println(data)
              println(jsonDictionary)
        }
    })还望广大懂得给个指点,要怎么弄才能把汉字也解析出来呢?谢谢!!!!!
查看全部
qq_22555381
qq_22555381
2015/07/01 08:07
  • json
  • ios
  • swift
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复