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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:44:06+00:00 2026-05-27T11:44:06+00:00

I am working some portion of twitter api, and getting some JSON response using

  • 0

I am working some portion of twitter api, and getting some JSON response using ASIHTTPREQUEST. Below is how the json representation looks like:

(
    {
        contributors = "<null>";
        coordinates = "<null>";
        "created_at" = "Tue Nov 29 15:48:35 +0000 2011";
        entities =         {
            hashtags =             (
            );
            media =             (
                                {
                    "display_url" = "pic.twitter.com/650E1WRY";
                    "expanded_url" = "http://twitter.com/ashu1702/status/141544088850796545/photo/1";
                    id = 141544088854990848;
                    "id_str" = 141544088854990848;
                    indices =                     (
                        22,
                        42
                    );
                    "media_url" = "http://p.twimg.com/AfbdmVBCEAAPJvT.jpg";
                    "media_url_https" = "https://p.twimg.com/AfbdmVBCEAAPJvT.jpg";
                    sizes =                     {
                        large =                         {
                            h = 279;
                            resize = fit;
                            w = 215;
                        };
                        medium =                         {
                            h = 279;
                            resize = fit;
                            w = 215;
                        };
                        small =                         {
                            h = 279;
                            resize = fit;
                            w = 215;
                        };
                        thumb =                         {
                            h = 150;
                            resize = crop;
                            w = 150;
                        };
                    };
                    type = photo;
                    url = "http://t.co/650E1WRY";
                }
            );
            urls =             (
            );
            "user_mentions" =             (
            );
        };
        favorited = 0;
        geo = "<null>";
        id = 141544088850796545;
        "id_str" = 141544088850796545;
        "in_reply_to_screen_name" = "<null>";
        "in_reply_to_status_id" = "<null>";
        "in_reply_to_status_id_str" = "<null>";
        "in_reply_to_user_id" = "<null>";
        "in_reply_to_user_id_str" = "<null>";
        place = "<null>";
        "possibly_sensitive" = 0;
        "retweet_count" = 0;
        retweeted = 0;
        source = "<a href=\"http://www.apple.com\" rel=\"nofollow\">iOS</a>";
        text = "I am in Syria @(null) http://t.co/650E1WRY";
        truncated = 0;
        user =         {
            "contributors_enabled" = 0;
            "created_at" = "Sun May 01 15:20:52 +0000 2011";
            "default_profile" = 1;
            "default_profile_image" = 1;
            description = "<null>";
            "favourites_count" = 0;
            "follow_request_sent" = "<null>";
            "followers_count" = 0;
            following = "<null>";
            "friends_count" = 5;
            "geo_enabled" = 0;
            id = 291164338;
            "id_str" = 291164338;
            "is_translator" = 0;
            lang = en;
            "listed_count" = 0;
            location = "<null>";
            name = "Ashutosh Tiwari";
            notifications = "<null>";
            "profile_background_color" = C0DEED;
            "profile_background_image_url" = "http://a0.twimg.com/images/themes/theme1/bg.png";
            "profile_background_image_url_https" = "https://si0.twimg.com/images/themes/theme1/bg.png";
            "profile_background_tile" = 0;
            "profile_image_url" = "http://a2.twimg.com/sticky/default_profile_images/default_profile_3_normal.png";
            "profile_image_url_https" = "https://si0.twimg.com/sticky/default_profile_images/default_profile_3_normal.png";
            "profile_link_color" = 0084B4;
            "profile_sidebar_border_color" = C0DEED;
            "profile_sidebar_fill_color" = DDEEF6;
            "profile_text_color" = 333333;
            "profile_use_background_image" = 1;
            protected = 0;
            "screen_name" = ashu1702;
            "show_all_inline_media" = 0;
            "statuses_count" = 62;
            "time_zone" = "<null>";
            url = "<null>";
            "utc_offset" = "<null>";
            verified = 0;
        };
    }
)

My concern here is, before actually setting the entire content to data model, is there any specific way to set the parameters to empty string?

Like there are two entities as “time_zone” = “”; and “utc_offset” = “”; Is there anyway to iterate through the json response and set @”” empty string. I don’t want to validate for NSNULL feature at every key point, and it can cause my app to have some loop holes to crash at some point, therefore I just want to figure out how to iterate through such complex json to check each entity and set empty string for NSNull type class. I did tried recursive way but it only gives the list of the upper level keys not the entities within the dictionary.

Thanks

  • 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-27T11:44:07+00:00Added an answer on May 27, 2026 at 11:44 am

    The "<null>" values appear to be character strings, not NSNulls. If you want to replace the character string with "", you could use stringByReplacingOccurrencesOfstring:withString: to convert them en mass (as some risk of converting stuff you don’t intend to).

    (But to be certain, it would be good if you presented some of the raw JSON, vs the Objective-C description of the NSArray/NSDictionary objects which is apparently what you’re showing.)

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

Sidebar

Related Questions

I'm looking through some code for learning purposes. I'm working through this portion of
I'm working on some production software, using C# on the .NET framework. I really
I'm working on some code using decltype in CodeGear RAD Studio. I've tried the
Okay I am working with some jquery creating dynamic popups. However, periodically the response
Working on some tweaks for a build script, I noticed that the output from
When working with some open source projects (in my case Joomla and Moodle), I've
Whilst working on some generally horrible Javascript code this morning, I came across the
I have been working on some legacy C++ code that uses variable length structures
I'm working on some code to colorize an image in Java. Basically what I'd
I am working with some CSS that is poorly written to say the least.

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.