[
{
"cont": 9714494770,
"id": "1",
"name": "Kakkad"
},
{
"cont": 9714494770,
"id": "2",
"name": "Ashish"
}
]
The one above is a json array filled with JSON objects. I don't know how to…
I'm trying to make the conversion from Objc to swift and have had better days.
I have a class with a dictionary:
collaborationDictionary:[String:Set]
I am trying to write/read this dictionary to/from a file and just can't quite seem to…
I know there is a question with same title here. But in that question, he is trying to convert a dictionary into JSON. But I have a simple sting like this:
"garden"
And I have to send it as JSON. I have tried SwiftyJSON but still I am unable to…
I'm looking at the Ray Wenderlich tutorial http://www.raywenderlich.com/90971/introduction-mapkit-swift-tutorial and he is using there this function:
class func fromJSON(json: [JSONValue]) -> Artwork? {
// 1
var title: String
if let titleOrNil…
I know with SwiftyJSON you can convert the objects from JSON to Swift.
Does SwiftyJSON allows you to go back? i.e. take NSManagedObjects with relationships and converting them it into JSON?
Example Please.
I recently added SwiftyJSON into my xCode project using Carthage.
Cartfile
$ cat Cartfile
github "SwiftyJSON/SwiftyJSON" >= 2.1.2
I ran this command to install SwiftyJSON
$ carthage update
I added the built Framework to my xCode project
I…
I m using Alamofire and SwiftyJSOn to parse JSON output. It works very well however some sites give json with escaped output. I use Alamofire like below
Alamofire.request(.POST, url, parameters: param, encoding: .JSON)
.responseJSON {…
I am trying to install 'Google-Maps-iOS-Utils' but it gives me above error.
Here is Podfile :
platform :ios, '9.0'
use_frameworks!
target 'MapClusters' do
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'GoogleMaps'
pod…
Given below is my custom swift class. My Question is how to convert an object of this class to a json string using SwiftyJson?
class Equipment{
var UniqueItemId:String? = ""
var ItemNo:String? = ""
var EquipmentType:String? = ""
…
I have added a JSON-file to my file-system where the data is structured like this:
{ "DDD" : "3D Systems Corporation", "MMM" : "3M Company", "WBAI" :
"500.com Limited", "WUBA" : "58.com Inc.", "AHC" : "A.H. Belo
Corporation", "ATEN" : "A10…
I have an array from JSON response. In this array from 0-20 positions. In every position can be an image or video. From the cycle I get the urls with images and videos. Sometimes I had 8 images and 2 videos, But had response - 8 urls of images, 2…
This was working in Swift2 but now in Swift3 (after automatic conversion) I'm getting an error:
if self.entry["scheduler"] || self.entry["owner"]
Cannot subscript a value of type 'JSON' with an index of type 'STRING'
The values of…
When I am about to fire my segue for the 2nd view I also send some values like this:
if let aTime = ads[indexPath.row]["unix_t"].int {
toView.time = aTime
}
if let aTitle = ads[indexPath.row]["title"].string {
toView.title = aTitle
}
In…
Ok, so I'm using alamofire and the parameters I'm passing are valid. Here is the code so far:
Alamofire.request(.POST, "http://mywebservice.com", parameters: myparameters)
.response { (request, response, data, error) in
if(error != nil){
…