Questions tagged [nsjsonserialization]

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

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

More information: NSJSONSerialization Class Reference

709 questions
0
votes
3 answers

Get a specific key JSON parser IOS

I have some problems to get a specific key in a JSON file. In fact, I'm using a MapView and a JSON file with some coordinates of restaurants. I can show the content of my JSON file, but I can't get de content at key: lat (latitude) and lng…
Lapinou
  • 1,467
  • 2
  • 20
  • 39
0
votes
1 answer

Create json string from core data and vice versa?

I have got entities in core data with one to many relationship. How can I convert data in my entities to json string and populate core data entities with json string once it is created? Any help would be greatly appreciated...
Shahrukh Malik
  • 242
  • 2
  • 15
0
votes
1 answer

Objective C NSJSONSerialization how to parse sub json

how to handle a json object with a sub object in the string. Here is an example [{"_id":"1","Title":"Pineapple","Description":"Dole Pineapple","Icon":"icon.png","Actions":{"ACTION_PHOTO":"coupon.png", "ACTION_LINK":"google.com"}}] How do you parse…
John D
  • 79
  • 1
  • 3
0
votes
2 answers

iOS Efficiently Parse Large JSONs from Documents Dir

When I load my app I download around 10-15 JSON files and store them into my apps documents directory-- some range from a few KBs to 30MB. Once that is finished, I need to grab each of them from the documents dir, convert to a NSDictionary, and…
RyanG
  • 4,393
  • 2
  • 39
  • 64
0
votes
2 answers

Download JSON data via NSJSONSerialization

I have a JSON string from PHP's json_encode(). This is how it looks in JSONViewer.stack.hu, and this is how it looks in the browser. Is it possible to use NSJSONSerialization to download the JSON data directly? If so, I am going to save the…
Jahm
  • 658
  • 1
  • 12
  • 27
0
votes
2 answers

Parsing a Django-created JSON

I recognize that there are a lot of SO topics on this already but all of them seem quite dated. IE: SBJSON parsing issue with Twitter's GET trends/:woeid and JSONValue ARC issue However, my JSON response is a little different. This is the raw…
samuelsaumanchan
  • 617
  • 1
  • 5
  • 10
0
votes
1 answer

Sorting NSJSON arrays aren't working properly

In my json file I have a title, subtitle, and url. I sort the title to set the items alphabetically, but the url isn't sorted with the title and I don't know why. This is what i've done: NSDictionary *allDataDictionary = [NSJSONSerialization…
Patrick R
  • 1,949
  • 3
  • 32
  • 58
0
votes
1 answer

objective c parsing returned json from wcf service

So I asked this question recently and I was able to make it work objective c calling wcf rest service request Here's my code NSString *urlStringRequest = [NSString…
gdubs
  • 2,724
  • 9
  • 55
  • 102
0
votes
1 answer

objective c calling wcf rest service request

I've been trying to look for online articles / tutorials on how to go about coding a request from a wcf service. I have the following web service uploaded to my server: [ServiceContract] public interface IUserAccountService { …
gdubs
  • 2,724
  • 9
  • 55
  • 102
0
votes
1 answer

A bit help for using queuing and Grand Central Dispatch on iOS

This is my problem, I'm building an iOS with some JSON returs from my server, here, no problems, all works fine. The problem is that when I run the program, it take a long long time to parse the result into a NSMutableArray: this is the…
0
votes
2 answers

How to parse Twitter search result with iOS NSJSONSerialization in a UITableView?

I'm having trouble parsing a Twitter search result with the built in iOS JSON parser. NSDictionary *resultorig = [NSJSONSerialization JSONObjectWithData:self.responseData options: NSJSONReadingMutableContainers error: &err]; NSMutableArray *result…
0SX
  • 1,252
  • 6
  • 24
  • 47
0
votes
3 answers

Second view in UITableView will not display parsed data from JSON

I have a parsed data from JSON file. It works like a charm in the first view of my UITableView. However, it displays a blank second view when I tap on an item. MasterView.h @interface MasterViewController : UITableViewController { NSArray…
Jahm
  • 658
  • 1
  • 12
  • 27
0
votes
2 answers

Parsing special characters in JSON

I'm now parsing with NSJSONSerialization NSData *jsonData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"url"]]; NSError *jsonError = nil; id jsonObject = [NSJSONSerialization JSONObjectWithData:jsonData…
Frenck
  • 6,514
  • 5
  • 22
  • 25
0
votes
1 answer

Making TableView Pull from 1 of 2 NSURLRequests

I am having trouble telling my table view which NSURLRequest it should target. I can get a basic table view to load with a single query, but am trying to make it pull the json string from a different URL if certain segmented controls are active.…
Brandon
  • 2,163
  • 6
  • 40
  • 64
0
votes
1 answer

POSTing an NSArray of NSDictionaries to Ruby webservice

I've been trying to POST to a REST service a JSON object that contains among other objects, an NSArray of NSDictionaries. I've been doing this for other services but curiously enought none of them included an NSArray of NSDictionaries, so for those…
carlos_ms
  • 838
  • 9
  • 15