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

learn more… | top users | synonyms

0
votes
1answer
25 views

NSJSONSerialization NSJSONReadingAllowFragments reading

In the following code for parsing a JSON, when objects happen to be other than NSArray or NSDictionary, NSJSONReadingAllowFragments is used. The below code works fine and prints out 32. but if ...
0
votes
4answers
70 views

How can you deserialize an escaped JSON string with NSJSONSerialization?

I have an iOS app that needs to process a response from a web service. The response is a serialized JSON string containing a serialized JSON object, looking something like this: "{ \"name\" : ...
1
vote
0answers
27 views

Parsing JSON object in Objective-C

Currently I have a JSON object, but when I parse the startLabel key paired element within VALUES, I return an nsdictionary with the first element being NULL and its keys being the values. Here is the ...
-1
votes
1answer
26 views

Displaying Google Feed JSON in my UITableView

I've tried to get the Google JSON data and put on my UITableView, but it's not showing up. Check the google JSON return: I've got the JSON and put on my dictionary already like you would do with ...
0
votes
1answer
30 views

NSJsonSerialization Post request Method

I have used SBJsonParser and ASIFormDataRequest for Posting and JSON Parsing, like NSString *urlStr = @"http:facebookpage/second/index.php"; NSURL *log_Url = [NSURL URLWithString:urlStr]; request = ...
0
votes
2answers
51 views

How to output data using NSJSONSerialization?

I'm trying to output some data using NSJSONSerializationusing the code below. This log statement works NSLog(@"publicData: %@", publicData); but then it crashes when I try to get the ...
1
vote
1answer
57 views

Wrong Json response on calling the WCF web service

Hii all i am facing the strange problem while dealing with the wcf json web-services.. The same web service when get called from android, It returns the valid JSON but when i am calling from the iOS i ...
0
votes
0answers
23 views

ios how to add integer and null into json post using nsmutablerequest and catch errors

I have the following code that I use to post into a .net web api that i Created as well. - (bool) updateMatchWCFWithMatchSuccessful{ NSArray *requestKeys = [EventObject getKeys]; // keys ...
0
votes
1answer
46 views

How to resolve multiple NSURLconnection with separated data

I have 2 separate NSURLConnection. NSURLConnection * connection_users; NSURLConnection * connection_cards; Then i created the data with parameters, etc. and I finish with: connection_users = ...
0
votes
1answer
33 views

NSJSONSerialization creating values of class NSCFConstantString?

I'm creating an NSDictionary from a valid JSON using NSJSONSerialization like this: id result = [NSJSONSerialization JSONObjectWithData:response ...
0
votes
1answer
38 views

iphone - return fbid to use it in json web service to receive data

I've been looking around, saw similar posts, but nothing like this that could give me answers. This is my setup and flow of the app: User has to login via Facebook, using Facebook Graph. LoginView ...
1
vote
1answer
39 views

JSON to NSDictionary literal

I need to build an NSDictionary that I can then parse with NSJSONSerialization in order to get a nice JSON formatted string. The final output of my JSON needs to be something like: "Viewport":{ ...
0
votes
1answer
24 views

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 ...
0
votes
0answers
47 views

NSURLConnection, NSMutableData & Cocoa error 3840

I have a standard asynchronous NSURLConnection operation and NSMutableData that loads json from a web service. - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse ...
0
votes
1answer
44 views

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 ...
3
votes
1answer
82 views

Issue with parsing JSON data

I am trying to convert a string into a json object and am unsure why this is not working. When I nslog the output I am told that urldata is not valid for json serialization however when looking at the ...
1
vote
1answer
138 views

NSJSONSerialization JSONObjectWithData returns null if json object has some junk value

I am using following code snippt to parse JSON object from the url. NSData* data = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlAddress] options:NSDataReadingUncached error:&error]; ...
1
vote
1answer
54 views

NSJSONSerialization output number as float?

I'm using NSJSONSerialization to convert a dictionary into JSON. If I include an NSDecimalNumber ( == 0 ) in that dictionary it outputs as 0. This is wrong. 0 is an int. I need it to output as 0.0. ...
0
votes
4answers
131 views

-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x8943940 while parsing JSON Page to UITableView

I have been through many links and fortunately I got many similar links but nothing worked Out. my array is appearing like this in Output, using NSLog().. products = ( { cid ...
1
vote
1answer
62 views

Is HTML tag make JSON file not valid?

Hey, I have a little problem here. I can load JSON file using AFHTTPRequestOperation with this code AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; ...
0
votes
1answer
122 views

NSJSONSerialization JSONObjectWithData:options:error: encoding issue

In my code, I download a JSON data encoded in UTF8, which is the ideal to work with NSJSONSerialization, but when I get the parsed object, it's full of encoding problems such as: "Jo\U00e3o e ...
-1
votes
2answers
43 views

release outside created autoreleased object inside a autoreleasepool {} [closed]

How can i force a autoreleasepool to release my autorelease object which was created outside the autoreleasepool {} the code im using - (void)connectionDidFinishLoading:(NSURLConnection ...
0
votes
1answer
44 views

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: ...
-3
votes
1answer
62 views

JSON posting in iOS not working (.NET server)

Posting request to .NET server is not working. NSDictionary *jsonDict = [NSDictionary dictionaryWithObjects:objects forKeys:keys]; NSURL *postURL = [NSURL URLWithString: @"SOME URL"]; NSError ...
-1
votes
1answer
34 views

Saving Twitter Streaming APIs results

Hi all so after a lot of hassle I managed to finally work my way around achieving and delimiting the JSON returned by Twitter Streaming APIs. How do i store the data returned by [NSJSONSerialization ...
1
vote
1answer
128 views

NSJSONSerialization crashing app

I have a dictionary that when I log it shows... { Date = "2013-04-30 17:17:18 +0000"; Description = Kb; EventID = "92193e58-c04a-4233-9a6c-1332bc056b20"; Title = Keyboard; } I'm ...
0
votes
1answer
39 views

iOS: NSJSONSerialization results in "data paremeter is nil' [closed]

I had the NSURLConnection and all the appropriate methods working in one view controller. Then i moved it to a UICollectionViewController and get an exception below - ...
-1
votes
1answer
93 views

NSCocoaErrorDomain Code=3840 issue while retrieving NSDATA to NSDictionary

I am creating iOS app which uses SQLite DB. I have created Table As: const char *sql_stmt = "CREATE TABLE IF NOT EXISTS ORDERTABLE (ID INTEGER PRIMARY KEY AUTOINCREMENT, ITEMDESC BLOB)"; and then ...
0
votes
2answers
124 views

iOS JSON parse trouble

How should I parse JSONs with format: { "1": { "name": "Бекон", "unit": "гр." }, "2": { "name": "Бульон куриный", "unit": "ст." } } and: { "recipeCode" : "00001", "inCategory" ...
1
vote
0answers
102 views

NSJSONSerialization works on IOS 6 but not on IOS 5.0

I'm working on restoring iOS 5.1 compatibility to an app I shipped which requires 6.0 currently. This code works perfectly under 6.0 but when running under 5.1 parsing returns a null object and an ...
-4
votes
1answer
53 views

Exception when reading JSON result [duplicate]

I am trying to parse the following JSON response: http://www.breakingnews.com/api/v5/items?compact=false. Here is my code to parse it: NSError* error = nil; NSData* data = [NSData ...
-1
votes
1answer
37 views

displaying JSON data with the help of dictionaries and array

I get the following error [__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x75a8e20 2013-04-20 08:56:14.90 MyApp[407:c07] *** Terminating app due to uncaught ...
-2
votes
2answers
98 views

Cant get data from nsdictionary of json with objectforkeys

I'm getting a json in a NSDictionary. I am watching this json if I do a NSLog of the NSDictionary. NSLog->> {"login":{"pass":"yeeply123","user":"Yeeply"}} I get places dictionary here: - ...
-2
votes
1answer
145 views

How can I POST data to JSON based REST API using NSJSONSerialization class?

I would like to see some concrete example(s)/tutorial on how to GET and POST data to and from a URL using NSJSONSerialization class. I know how to actually GET the data , it is the POST which is ...
0
votes
2answers
81 views

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", ...
0
votes
1answer
135 views

NSURLConnection response not complete

I am making call to a server requesting JSON data using NSURLConnection. For some reason I get part of the response. If I hit the url through the browser the response its correct. The weird thing is ...
0
votes
1answer
208 views

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 ...
1
vote
3answers
69 views

Cancelling NSJSONSerialization - Search as you type, requests overlapping

Similar to the iPhone Facebook app search function, I am implementing search as you type functionality into my application although I have a problem when decoding the data into JSON format. ...
0
votes
1answer
652 views

Serialize JSON string SBJSON vs NSJSONSerialization vs anything else?

I am receiving this JSON string and want to know how to serialize it into a dictionary so that I can parse it into a managed object. I have looked at a few ways (named in the title), and can't seem ...
3
votes
0answers
287 views

NSJSONSerialization serialization of a string containing forward slashes / and HTML is escaped incorrectly

I am trying to convert some simple HTML into a string value in a JSON object and I'm having trouble getting the string encoding to not escape the string in NSJSONSerialization. Example... I have a ...
0
votes
0answers
77 views

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 echo ...
0
votes
1answer
112 views

JSON response encoding not coming back utf

I am trying to decode a json string with either jsonkit or nsjsonserialization from a server but I am getting the colon : marks changed to equal = signs and commas , changed to semi-colons ; e.g. from ...
0
votes
1answer
81 views

JSONKit not deserializing property without quotes

I'm trying to deserilaize the following into an NSDictionary using both JSONKit and Apple's built in json serlializer {route:"/tasks/4f9218a27e5c8f0000000000"} why does it fail NSDictionary ...
0
votes
1answer
241 views

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. ...
-2
votes
1answer
64 views

How to send & receive data from ios application with JSON [duplicate]

Hi i am not very much familiar to iOS programming , i am making an application that will interact with web (php). I need to know how to send & receive the data from web using JSON ?
0
votes
3answers
94 views

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 ...
0
votes
1answer
687 views

The Operation couldn't be completed. (Cocoa error: 3840.)

I am trying to parse JSON for an ios 6 app, but can't seem to get it to work. I have scoured tons of forums but haven't found a solution that works, that I understand enough to implement, or that ...
0
votes
1answer
123 views

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 = ...
0
votes
3answers
142 views

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 ...
0
votes
1answer
67 views

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 ...

1 2 3 4
15 30 50 per page