how to parse this json using alamofire swift

Alamofire.request(url, method: .post, parameters: parameters, encoding: JSONEncoding.default) .responseJSON { response in print(response) //to get status code if let status = response.response?.statusCode { switch(status){ case 201: print(“example success”) default: print(“error with response status: \(status)”) } } //to get JSON return value if let result = response.result.value { let JSON = result as! NSDictionary print(JSON) } }

Can comments be used in JSON?

No. The JSON is data only, and if you include a comment, then it will be data too. You could have a designated data element called “_comment” (or something) that should be ignored by apps that use the JSON data. You would probably be better having the comment in the processes that generates/receives the JSON, … Read more