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
1 answer

DetailViewController not showing the data for Twitter Trends

I am a beginner trying to learn to parse JSON using NSJSONSerialization in iOS 6.1. I am tinkering with Twitter API and trying to retrieve the Twitter trends api, I am able to retrieve the Twitter trends in my TableView however when I am trying to…
Shreek
  • 31
  • 1
  • 5
0
votes
1 answer

UITableview sorted in sections by distinct date

I am getting events from a Shared Google Calendar into my App using JSON. On some dates there are 2 or more events. As you can see here - the dates (found under {gd$when}, {startDate} are in a long format (2013-04-28T19:00:00.000+02:00). I would…
catu
  • 888
  • 6
  • 24
0
votes
1 answer

iOS6 Sort JSON objects

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

iOS JSON parse trouble

How should I parse JSONs with format: { "1": { "name": "Бекон", "unit": "гр." }, "2": { "name": "Бульон куриный", "unit": "ст." } } and: { "recipeCode" : "00001", "inCategory" : "12", "recipe" : "Зимний тыквенный суп", …
Romowski
  • 1,518
  • 5
  • 25
  • 50
0
votes
2 answers

How to parse json data with "var abcd =" header

I'm having problem with parsing json data file on iOS. This is a sample from the data.json file: var devs = [ { "ident":"1", "firstname":"Jan", "lastname":"Kowalski", "img":"http://www.placekitten.com/125/125", "tech":"iOS, HTML5, CSS,…
0
votes
1 answer

JSON parsed using NSJSONSerialization from JSON file returns an empty array

I have a JSON file which I am trying to parse as seen below -(void)loadSuraNames { NSURL * url = [NSURL URLWithString:@"http://www.submission.ws/downloads/json/"]; url = [url URLByAppendingPathComponent:@"quran_main.json"]; NSURLRequest *request…
real 19
  • 748
  • 8
  • 32
0
votes
0 answers

Null data parsing data JSON

When I view this (the end of a method) on a browser I see the printout of the JSON echo. JSON…
William Falcon
  • 9,813
  • 14
  • 67
  • 110
0
votes
1 answer

How to execute first simple PHP api example using Xcode

This is my first API that I am calling from a demo iOS app. I just want to get the simple sentence I wrote in the php back to a label. However the dictionary result is null when I get it in the app. How does this work? ***Corrected, code below works…
William Falcon
  • 9,813
  • 14
  • 67
  • 110
0
votes
3 answers

NSJSONSerialization data in a different format

I am using Parse.com as a backend of my application, where I am currently storing the data there. The data is a list of video game consoles. I was able to make an output of it, but instead of JSON data, the output is a big NSMutableArray. This is my…
Jahm
  • 658
  • 1
  • 12
  • 27
0
votes
1 answer

how to delete the Superfluous Escape-character in a NSString object

I'm a newbie about development of iOS. And when I deal a json with NSJSONSerialization , I find something really a problem to me. NSLog(@"response: %@", responseString); NSData *jsonData = [responseString…
Puttin
  • 1,596
  • 23
  • 27
0
votes
3 answers

NSJSONSerialization crashes when pulling data from specific url

I'm trying to pull data from this url, but I am running into some problems. Why does this crash on the NSJSONSerialization line? Is there a better way to download info from this website? EDIT: I changed jsonArray from a NSArray to a NSDictionary,…
user1413558
  • 3,849
  • 3
  • 16
  • 17
0
votes
1 answer

Weird error with NSJSONSerialization and UIPIckerView

The way I have my program working is it pulls data down into the program via AFHTTPClient. Then I get my response data. I then take this data and parse it into a NSMutableArray via NSJSONSerialization. This array is used to populate a UIPickerView.…
JohnV
  • 285
  • 1
  • 3
  • 13
0
votes
1 answer

NSJSONSerialization for Twitter API Search Requests

I have been trying to get a twitter search to work using NSJSONSerialization to parse the query results. I originally used a tutorial on accessing Twitter data using an SLRequest, but I've found that in doing this I need the results to update a…
brocklee
  • 75
  • 1
  • 1
  • 6
0
votes
0 answers

Causing crash when serialize using NSJSONSerialization in iOS

In my iPhone application I am calling a webservice using JSON. And I using NSJSONSerialization for retrieving the data from service. I am getting crash at random points when I run the app. Here is the screen shot of the issue. Can someone please…
Mithuzz
  • 1,091
  • 14
  • 43
0
votes
1 answer

Json Parsing Issue but working fine when i copy the response in txt file

This is my code for parsing the json service. But I am getting nil value in json dictionary. But when I copied the json response and make a .txt file and parse it. It works well. strange issue. -(void)viewDidLoad { [super viewDidLoad]; …
Rythm
  • 191
  • 1
  • 16