Browse Source

1.json 不能去掉空格

huangxiaodong 1 year ago
parent
commit
050d1e7820
1 changed files with 2 additions and 2 deletions
  1. 2 2
      创维盒子/双子星云手机/Helpers/iTools.m

+ 2 - 2
创维盒子/双子星云手机/Helpers/iTools.m

@@ -1147,8 +1147,8 @@ static const char encodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopq
     NSData *data = [NSJSONSerialization dataWithJSONObject:arr options:NSJSONWritingPrettyPrinted error:nil];
     NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
     jsonStr = [jsonStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
-    jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@" " withString:@""];
-    jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@"\n" withString:@""];
+    //jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@" " withString:@""];
+    //jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@"\n" withString:@""];
     if (parseError) {
         jsonStr = @"";
     }