I am looking to populate a TableView in Xcode (Swift) with information from a Json file. To illustrate, here is what I aim to achieve: My goal is to extract json data regarding countries, cities, and additional city details. On the initial screen, I want ...
I am currently facing a certain challenge. My approach involves using Alamofire request to retrieve a JSON response. Alamofire.request(url, method: .get).responseJSON { response in if response.result.isSuccess { print ...
Struggling with a seemingly simple REST call that has left me completely stuck. I have a node-based restful service that requires an array of strings as input. However, every time I make the call with what seems like a valid parameter, the server throws an ...
After logging in, I saved my user JSON data on the key "user". How can I update this value when I press the save button? For example, changing the value of "crew_preferred_name" to "Xiao Pang". UserDefaults.standard.set(json, forKey: "json") user = UserDe ...
I have come across this JSON data and I am using ObjectMapper to work with it: Access Api Snippet of Response { "data": [ { "CategoryName": "רוגע", "CategoryID": "63", "CategoryDate": "2016-08-26 02:12:05", "CategoryIma ...
This JSON data is the server's response to my request, but I'm struggling to extract and parse the values correctly. {"items": [{"item": { "id":824, "company_id":31, "config_id":45, "imagesmall":null, "im ...
Within a view controller class, the following code resides: import UIKit class orderStatusVC: UIViewController { //================ Segue Initializers ================// var orderNumber: String = "" //================ Member Variables ===== ...
public class LessonAssignment { private var title : String? private var category : String? private var week : Int? private var day : Int? //Title public func getTitle() -> String { return title! } public func ...
How do I go about receiving a JSON object within the Swift Socket.IO client? Node.js When using socket.io on Node.js, I emit a JSON object like in this simple example: socket.emit('welcome', { text : 'Hello, World!' }); Swift In an ...
For some reason, my code isn't working as expected and the result is always nil. I have incorporated Alamofire and SwiftyJSON into my code. Here is a snippet: let urlString = "myurl" let params: Parameters = [ "accessProvider": AccessProvider, ...