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 9133033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:25:01+00:00 2026-06-17T08:25:01+00:00

I am trying to parse a json here but keep on getting errors for

  • 0

I am trying to parse a json here but keep on getting errors for some reason. my code is

    NSString *string = [NSString stringWithFormat:@"http://api.wunderground.com/api/3c158b3b3cd6ce90/hourly/q/11758.json"];//, query];
NSString *string2 = [string stringByReplacingOccurrencesOfString:@" " withString:@"_"];
NSData* data = [NSData dataWithContentsOfURL:
                [NSURL URLWithString:string]];
NSError* error;

NSDictionary *res = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];

NSArray* latestLoans = [res objectForKey:@"forecast"]; //2
NSArray *tmp = [latestLoans valueForKey:@"temp"];
NSLog(@"temp: %@", tmp);

and the error is

temp: (null)
Entity: line 2: parser error : Start tag expected, '<' not found
{
^

I don’t get this because the URL is real and gets a response, and I need help with this

  • 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-06-17T08:25:03+00:00Added an answer on June 17, 2026 at 8:25 am

    What you are looking for, “forecast”, does not exist in the response. Perhaps what you are looking for is “hourly_forecast”.

    NSArray* latestLoans = [res objectForKey:@"hourly_forecast"]; //2
    NSArray *tmp = [latestLoans valueForKey:@"temp"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to parse some JSON but I'm having some trouble. Here's what I
I'm trying to parse a JSON string but when I do I get undefined.
Im trying to parse twitter trends but i keep getting a parser error at
I am trying to parse the following JSON but i am getting the following
I'm trying to parse some JSON object strings that I'm getting using gson-1.6.jar I
i'm trying to parse some json in perl, but am having problems with it.
I'm trying to parse this JSON Array: http://www.ifanatic.hu/api/get_recent_posts/?dev=1 But I get this error: 2012-07-15
I'm trying to parse a json response data from youtube api but i keep
I was trying to parse a JSON string from USGS . However I get
I am trying to parse some JSON on the Windows Phone with DataContractJsonSerializer .

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.