• IOS


    [manager GET:serverURL parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {

            // 3 解析返回的JSON数据

            // 3.1

    //        NSDictionary *result1 = (NSDictionary *)responseObject;

            // 3.2

    //        NSString *requestTmp = [NSString stringWithString:operation.responseString];

    //        NSData *resData = [[NSData alloc] initWithData:[requestTmp dataUsingEncoding:NSUTF8StringEncoding]];

    //        NSDictionary *result2 = [NSJSONSerialization JSONObjectWithData:resData options:NSJSONReadingMutableLeaves error:nil];

    //        NSLog(@"response:%@",responseObject);

            

            // 3.3

            NSData *responseData = [NSJSONSerialization dataWithJSONObject:responseObject options:NSJSONWritingPrettyPrinted error:nil];

            NSDictionary *result3 = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableLeaves error:nil];

  • 相关阅读:
    Vue-嵌套路由
    Vue-详解设置路由导航的两种方法: <router-link :to="..."> 和router.push(...)
    Python
    windows和linux下 Python2,Python3 的环境及安装
    Python那点事
    Linux
    Linux
    Django
    Redis
    Django
  • 原文地址:https://www.cnblogs.com/tx8899/p/4084314.html
Copyright © 2020-2023  润新知