Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:09:38+00:00 2026-05-25T03:09:38+00:00

I am using following code for other JSON data its working but here it

  • 0

I am using following code for other JSON data its working but here it gives dictionary exception it has small amount of data.

This is data which i am parsing

   { "affectedDate": 1310515200000, 
   "category": "Sport", 
   "content": "Kl 2100 hver tredje lørdag i måneden arrangerer Harvey's en interaktiv  fotballquiz på våre 13 HD-skjermer. Nivået er høyt, men samtidig er det underholdning i form av videoproduksjoner og midt i blinken for enhver fotballinteressert kristiansander. Quizen er myntet på folk som har lyst å lære litt om fotball - og ikke bare de som vet hvor mange fly som gjennomsnittlig flyr over Goodison Park. Det er 1-4 personer pr lag og gratis påmelding i baren på Harvey's eller på tlf 380 72305. Umbro er hovedsponsor av Harvey's Saturday Night Football Quiz og stiller med flotte rundepremier! \n

\n
Vi har også en maratontabell bestående av alle resultatene fra 2011s runder, men hvor vi stryker hvert lag sine fire dårligste poengsummer foran finalen i desember. Laget som vinner sammenlagt sender vi til EM i Polen og Ukraina neste sommer!\n
\n
Utvalgte deler av tidligere quizer, soundtrack, maratontabell og annen informasjon finner du for øvrig på våre hjemmesider http://www.harveys.no\n
\n
Vi garanterer at dette er en månedlig fotballhappening å få med seg!”,
“eventId”: 15946, “image”: “http://shelf-media.s3.amazonaws.com/39be3cbc5584eb0e9f61c9926a62d478_gmedium.jpg”,

   "latitude": "58.1441382", 
  "longitude": "7.9933589", 
  "title": "HARVEY'S SATURDAY NIGHT FOOTBALL QUIZ" } 



SBJsonParser *parser = [[SBJsonParser alloc] init];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.krsconnect.no/community/api.html?method=event&appid=620&eventid=15946&affecteddate=1310515200000"]];
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
NSDictionary *object = [parser objectWithString:json_string error:nil];
appDelegate.books1 = [[NSMutableArray alloc] init];
appDelegate.dates =[[NSMutableArray alloc]init];
appDelegate.descriptionArray=[[NSMutableArray alloc]init];
NSArray *results = [parser objectWithString:json_string error:nil];
NSLog(@"%@", results);

for (int i=0; i<[results count]; i++) {
  Detail  *aBook = [[Detail alloc] initWithDictionary:[results objectAtIndex:i]];      
  [appDelegate.descriptionArray addObject:aBook];
  [aBook release];  
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:09:39+00:00Added an answer on May 25, 2026 at 3:09 am

    When I look at the actual web page the outermost structure is an “object” (dictionary). But you parse the input string twice, once expecting a dictionary and the second time an array (it can’t be both). It’s the array you’re accessing when you get the error, I suspect. (Can’t tell for sure since you didn’t provide any log or other error info.)

    In general, you need to test (with isKindOfClass) the type returned from a JSON parser, to make sure it’s the type you expect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using following code but cannot return data from MySQL. This is the output:
I'm using the following code to create divs with random products. The JSON data
Using the following code I get a nice formatted string: Request.QueryString.ToString Gives me something
I am using following code to open a file dialog box, but nothing happens
I am using following code in rowdatabound function. Protected Sub gvwMileStone_RowDataBound(ByVal sender As System.Object,
I am using following code to check whether a check box on my website
I am using following code to design my home page. The output (as shown
I open a pop-up window using following code in main.html function openwindow(url) { window.open(url,
I am setting the row height of my UITableView using following code [tableView setRowHeight:
Using the following code, I'm retrieving a list of Integers from a DB and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.