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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:58:05+00:00 2026-05-27T16:58:05+00:00

i am using JSON webservices in my project.i parse the json method and collect

  • 0

i am using JSON webservices in my project.i parse the json method and collect the data and display it whereever it is required.

In JSON method will be of two types,one is simple array

{ } // we use NSdictionary here to collect the data

Another is of this format

{“abc” [ {} ] } // we use NSArray to collect the data

What my question is we write the code in our project before itself just linking up to webservices,whatever data we require that we will mention and collect the data.

For example we use NSDictionary in our code thinking json method is of { } format. if later json method changes to { [ {} ] } according to the services added at the client side then how do we differenciate and write our code whethere the incoming json method is of NSArray or NSDicationary.

  • 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-27T16:58:06+00:00Added an answer on May 27, 2026 at 4:58 pm

    simply

    id respData = [Json objectWithUrl:[NSURL URLWithString:urlStr]];
    
    if([respData isKindOfClass:[NSDictionary class]])
    {
        NSArray *respArray = (NSArray *)respData;
       [networkListTableView reloadData];
    }
    else if([respData isKindOfClass:[NSArray class]])
    {
        othersArray =  [Json objectWithUrl:[NSURL URLWithString:urlStr]];
        [networkListTableView reloadData];    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I parse data using JSON in javascript, I find this is very convenient. But
I am using json.net to parse objects and delivering them to a webservice I
I am using json data and iterating it through jquery and displaying my results...
I am trying to parse JSON in an Adobe Flex app, using http://www.mikechambers.com/blog/2006/03/28/tutorial-using-json-with-flex-2-and-actionscript-3/'>This Tutorial
Is it possible to send json and receive json using spring webservices? Thanks Damien
I'm using JQuery to make a JSON request to access data on a private
I am using mootools library to call webservices in an asp.net application. one of
Hello friends i am using https server data using JSOn webservice but i don't
i want to post data on a server and i am using jSON webservice.
In my application I am fetching data using webservices.But when the server is down

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.