如何使用SwiftyJSON swift 4.2解析ID,为什么会出错?

时间:2019-03-04 12:45:02

标签: swifty-json

//This JSON {"data":[{"id":288,"eid":16,"admin":true},{"id":289,"eid":16,"admin":false}],"meta":{"count":2}}
  

Alamofire.request(self.url,标头:header).responseJSON   (completionHandler:{在                       statusCode =(response.response?.statusCode)!                       如果statusCode!= 200 {                       }其他{                           切换response.result {                           案例.success(让responseJSON):                               让json = JSON(responseJSON)                               打印(json)                               让数据= json [“数据”]                               打印(数据)                           情况.failure(_):                               打印(“错误”)                           }                       }                   })               }           }       }

0 个答案:

没有答案