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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:24:44+00:00 2026-06-12T14:24:44+00:00

I have created a rest service whose output is of the form { id:

  • 0

I have created a rest service whose output is of the form

 {
        "id": "1905",
        "groupId": "724",
        "giftingId": null,
        "name": "This is a great service",
   }

I am using AFNetworking http client to call this service. Its output is

  {
     name = "This is a great service";
     id = 1905;
     groupId = 724;
     giftingId = "<null>";
  }

I am unable to parse that gifting id when its null. I simply want to parse the data to NSString? Why is it parsing the JSON as integers when they are sent as strings?

  • 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-12T14:24:45+00:00Added an answer on June 12, 2026 at 2:24 pm

    I think you are misunderstanding what you are seeing in the output. When an NSDictionary is output, it doesn’t print double quotes for any string that is all letters and number. This is a great service has spaces and <null> has angle brackets.

    I’m pretty sure that the dictionary which prints as:

    {
        name = "This is a great service";
        id = 1905;
        groupId = 724;
        giftingId = "<null>";
    }
    

    is actually:

    @{
        @"name" : @"This is a great service",
        @"id" : @"1905",
        @"groupId" : @"724",
        @"giftingId" : [NSNull null],
    }
    

    I think the solution here is handling and detecting the NSNull. [JSON[@"giftingId"] isEqual:[NSNull null]] should be able to detect if giftingId is an NSNull.

    If you don’t have the lastest Xcode, then you should use [[JSON objectForKey:@"giftingId"] isEqual:[NSNull null]]

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

Sidebar

Related Questions

I have created a REST web service and successfully used it with a client.
I have ASP MVC 3 application. I created WCF REST JSON Service and added
I have created a REST Web Service that in all other ways is working
I have created a hidden form element <form name=UploadImage enctype=multipart/form-data method=post action=UploadImage> <label> </label>
have created REST service using servicestack and in post request I have return object
I have just created my first rest service using apicontroller. I am using it
I created a new wcf rest service using .net 4. I have created a
I have created a REST web service that, on Application_Start, subscribes to another service
I have created a WCF REST style service in my project. In development I
I have created a REST web service using WCF and use HTTP Post Method.

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.