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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:47:10+00:00 2026-06-14T00:47:10+00:00

Been stuck all day with this and reach out to get some help solving

  • 0

Been stuck all day with this and reach out to get some help solving this asap. Any help would be great. Thank’s 🙂

The missing quotes

Got this AFJSONRequestOperation request from the web and it works great exept for one crucial fault: some keys are missing the quotes around there values = cant use them! There’s obviusly some parsing going on in the AFNetworking background since the values come back i alphabetical order + “trimmed” of some of the qoutes on some values. But I just want the webdata “as is”…

The format should look like this;
theKey = “theValue”;

But sometimes it looks like this;
theKey = theValue;     // Note the missing quotes around the value

The web output json:

I’ve also checked that my json is correct formatted coming from the server, the output looks like this;

{"results":[{"ID":"3","Row_state":"Visible","CustName":"Customer Name","CustReferens":"Customer Referens","CustReferensMobil":"123456mob","CustNotes":"Customer Notes","Tel":"123456tel","Fax":"123456fax","Web":"www.example.se","Mail":"info@example.se","Street":"The road 5","Zip":"11122","City":"Stockholm","Products":"","Images":"","Logo":"myLogo.jpg","Text":"A lot of text goese here...","Seller":"","Favorite":"YES"},

In the app I get this result;

results =     (
            {
        City = Stockholm;          // Note the missing quotes around the value
        CustName = "Customer Name";
        CustNotes = "Customer Notes";
        CustReferens = "Customer Referens";
        CustReferensMobil = 123456mob;     // Note the missing quotes around the value
        Favorite = YES;             // Note the missing quotes around the value
        Fax = 123456fax;          // Note the missing quotes around the value
        ID = 3;             // Note the missing quotes around the value
        Images = "";
        Logo = "myLogo.jpg";
        Mail = "info@example.se";
        Products = "";
        "Row_state" = Visible;      // Now key got quotes + Note the missing quotes around the value
        Seller = "";
        Street = "The road 5";
        Tel = 123456tel;         // Note the missing quotes around the value
        Text = "A lot of text goese here...";
        Web = "www.example.se";
        Zip = 11122;       // Note the missing quotes around the value
    },

Instead of this expected result (all keys with quotes around the value);

results =     (
            {
        City = "Stockholm";
        CustName = "Customer Name";
        CustNotes = "Customer Notes";
        CustReferens = "Customer Referens";
        CustReferensMobil = "123456mob";
        Favorite = "YES";
        Fax = "123456fax";
        ID = "3";
        Images = "";
        Logo = "myLogo.jpg";
        Mail = "info@example.se";
        Products = "";
        "Row_state" = Visible;
        Seller = "";
        Street = "The road 5";
        Tel = "123456tel";
        Text = "A lot of text goese here...";
        Web = "www.example.se";
        Zip = "11122";
    },

My code for this;

NSURL *myUrl = [NSURL URLWithString:@"http://example.se/api.lasso"];
NSURLRequest *request = [NSURLRequest requestWithURL:myUrl];
AFJSONRequestOperation *operation;
operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request
success:^(NSURLRequest *req, NSHTTPURLResponse *responce, id jsonObject) {
                                            NSLog(@"JSON Responce ÅF: %@",jsonObject);
                                            // Add result (an array from JSON) to NSMutableArray
                                            _restFeed = [jsonObject objectForKey:@"results"];
                                            NSLog(@"RestA-OListTVC > ViewDidload > AFN ÅF: _restFeed count = %i",[_restFeed count]);
                                            // Reload table with new data
                                            [self.tableView reloadData];
                                            }
failure:^(NSURLRequest *req, NSHTTPURLResponse *responce, NSError *error, id jsonObject) {
            NSLog(@"Recieved an HTTP %d", responce.statusCode);
            NSLog(@"The error was: %@",error);
            }];
[operation start];
  • 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-14T00:47:11+00:00Added an answer on June 14, 2026 at 12:47 am

    All JSON keys have quotes around them–that’s part of the specification. However, when turned into an NSDictionary, their keys lose the quotes and just become NSString objects.

    JSON {"a": 1} => Objective-C @{@"a" : @(1)}

    NSLog will strip the quotes around strings that don’t contain whitespace. Don’t use the output of NSLog as the literal representation of what you’re getting back. Just use the values as expected, with valueForKeyPath: and it should all work just fine.

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

Sidebar

Related Questions

I've been banging on this all day and it's time to get some help.
Ive been stuck on this all day and finally found a script which would
I've been stuck on this all day, and have just run out of ideas.
I'm stuck on this and have been all day.. I'm still pretty new to
I've been working at this all day so I hope I don't forget any
I'm stuck. Been messing with this all day. To me this looks like it
Possible Duplicate: Weird “406 not acceptable” error I've been stuck on this ALL DAY!
I've been stuck on this all day, I have a script I'm working with
I've been stuck on this all day. I have a setup like the one
Please someone help me! I've been at this all day. I've seen several different

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.