What do you want to save?
Add Code snippet
New code examples
-
Swift 2021-11-08 18:41:15
weather api in ios swift 5
private func processWeatherData(data: Data, completion: WeatherDataCompletion) { if let JSON = try? JSONSerialization.jsonObject(with: data, options: []) as AnyObject { completion(JSON, nil) } else { completion(nil, .InvalidRespons... Add solution -
Other 2021-11-03 12:28:06
Swift REST Api Call
let params = ["username":"john", "password":"123456"] as Dictionary<String, String> var request = URLRequest(url: URL(string: "http://localhost:8080/api/1/login")!) request.httpMethod = "POST&q... Add solution -
Javascript 2021-09-10 17:11:02
javascript check if json object is valid
//extensive check to make sure object is not of string type and not null function isJson(item) { item = typeof item !== "string" ? JSON.stringify(item) : item; try { item = JSON.parse(item); } catch (e) { ... Add solution