Top "Nsjsonserialization" questions

NSJSONSerialization class is used to convert JSON to Foundation objects and Foundation objects to JSON

How to convert a JSON string to a dictionary?

I want to make one function in my swift project that converts String to Dictionary json format but I got …

json swift dictionary nsjsonserialization
Reading in a JSON File Using Swift

I'm really struggling with trying to read a JSON file into Swift so I can play around with it. I've …

json xcode swift ios8 nsjsonserialization
Could not cast value of type 'NSTaggedPointerString' to 'NSNumber'

I have a Swift struct like this. struct Usage { var totalData: Double var remainingTotalData: Double init(jsonData: NSData) { var jsonDict = […

ios swift double nsjsonserialization
NSJSONSerialization from NSString

Is it possible if I have a NSString and I want to use NSJSONSerialization? How do I do this?

ios objective-c iphone ipad nsjsonserialization
how to create json in objective-c

NSData* jsonDataToSendTheServer; NSDictionary *setUser = [NSDictionary dictionaryWithObjectsAndKeys:[@"u" stringByAppendingString:my.id],@"id", @"GET_USER_INFO",@"command", @"",@"value", nil]; NSLog(@"%@", jsonDataToSendTheServer); Here …

ios objective-c json nsjsonserialization
Converting NSObject to NSDictionary

Hello I a class of type NSObject: ProductDetails *details = [[ProductDetails alloc] init]; details.name = @"Soap1"; details.color = @"Red"; details.quantity = 4; …

objective-c ios6 nsdictionary nsjsonserialization
Swift, NSJSONSerialization and NSError

The problem is when there is incomplete data NSJSONSerialization.JSONObjectWithData is crashing the application giving unexpectedly found nil while unwrapping …

swift nsjsonserialization nserror
How do I fetch data from URL, using xcode 4.3.1 with NSJSONSerialization Class Reference

I am trying to get my head around the NSJSONSerialization Class Reference. In the lack of a code-example at the …

iphone ios json xcode4.3 nsjsonserialization
Swift: Convert struct to JSON?

I created a struct and want to save it as a JSON-file. struct Sentence { var sentence = "" var lang = "" } var s = …

json swift struct nsjsonserialization
Issue in converting NSDictionary to json string, replacing / with \/

i want to convert NSDictionary to json string.everything is working fine, i have a small issue that is described …

objective-c json nsjsonserialization