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

  • SEARCH
  • Home
  • 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 6595663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:58:08+00:00 2026-05-25T17:58:08+00:00

I’m attempting to create an array from parsed JSON. I know that the JSON

  • 0

I’m attempting to create an array from parsed JSON. I know that the JSON is parsing correctly because I tested it by outputting the values into the console. I then changed the code to:

// Start parsing the json
SBJsonParser *parser = [[SBJsonParser alloc] init];
NSError *jsonError;
parsedJson = [[parser objectWithString:myRawJson error:&jsonError] copy];

[parser release];

NSDictionary *price = [parsedJson objectForKey:@"prices"];
NSEnumerator *enumerator = [price objectEnumerator];
NSDictionary* item;

while (item = (NSDictionary*)[enumerator nextObject]) {
    NSArray *price_chunk = [[NSArray alloc] arrayWithObjects:[item objectForKey:@"id"],[item objectForKey:@"table"],[item objectForKey:@"table_id"],[item objectForKey:@"value"],nil];
    NSLog(@"Prices ID: %@", [price_chunk objectAtIndex:0]);
    NSLog(@"Prices Table: %@", [price_chunk objectAtIndex:1]);
    NSLog(@"Prices Table ID: %@", [price_chunk objectAtIndex:2]);
    NSLog(@"Prices Value: %@", [price_chunk objectAtIndex:3]);
}

So I’m trying to make the array, and then test the array by outputting the data into the console. The app crashes, and I receive:

2011-09-21 11:36:56.397 vegas_hipster[23496:207]
-[__NSPlaceholderArray arrayWithObjects:]: unrecognized selector sent
to instance 0x631b820

2011-09-21 11:36:56.399 vegas_hipster[23496:207] * Terminating app
due to uncaught exception ‘NSInvalidArgumentException’, reason:
‘-[__NSPlaceholderArray arrayWithObjects:]: unrecognized selector sent
to instance 0x631b820’

* Call stack at first throw:

(

0   CoreFoundation                      0x01624be9 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x017795c2 objc_exception_throw + 47
2   CoreFoundation                      0x016266fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3   CoreFoundation                      0x01596366 ___forwarding___ + 966
4   CoreFoundation                      0x01595f22 _CF_forwarding_prep_0 + 50
5   vegas_hipster                       0x0006ec88 -[UpdateViewController update:] + 1433
6   UIKit                               0x003bfa6e -[UIApplication sendAction:to:from:forEvent:] + 119
7   UIKit                               0x0044e1b5 -[UIControl sendAction:to:forEvent:] + 67
8   UIKit                               0x00450647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
9   UIKit                               0x0044f438 -[UIControl touchesBegan:withEvent:] + 277
10  UIKit                               0x003e4025 -[UIWindow _sendTouchesForEvent:] + 395
11  UIKit                               0x003c537a -[UIApplication sendEvent:] + 447
12  UIKit                               0x003ca732 _UIApplicationHandleEvent + 7576
13  GraphicsServices                    0x01dd2a36 PurpleEventCallback + 1550
14  CoreFoundation                      0x01606064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
15  CoreFoundation                      0x015666f7 __CFRunLoopDoSource1 + 215
16  CoreFoundation                      0x01563983 __CFRunLoopRun + 979
17  CoreFoundation                      0x01563240 CFRunLoopRunSpecific + 208
18  CoreFoundation                      0x01563161 CFRunLoopRunInMode + 97
19  GraphicsServices                    0x01dd1268 GSEventRunModal + 217
20  GraphicsServices                    0x01dd132d GSEventRun + 115
21  UIKit                               0x003ce42e UIApplicationMain + 1160
22  vegas_hipster                       0x00002330 main + 102
23  vegas_hipster                       0x000022c1 start + 53
24  ???                                 0x00000001 0x0 + 1

)

terminate called after throwing an instance of ‘NSException’

Program received signal: “SIGABRT”.

  • 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-25T17:58:09+00:00Added an answer on May 25, 2026 at 5:58 pm

    You need to use initWithObjects: method, not arrayWithObjects.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into

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.