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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:12:39+00:00 2026-06-15T01:12:39+00:00

Am facing a really confusing situation while parsing with json. The Scenario is, Step

  • 0

Am facing a really confusing situation while parsing with json.

The Scenario is,

Step 1 : I have two links

     1. http://www.xyz.com/json/getpidl.asp?id=5527446
     2. http://www.xyz.com/json/getpidl.acp?id=5587963
     ****BOTH LINKS ARE WORKING** **

Step 2 : Now am trying to encode the json string from these two links(one by one) with the following code

    NSMutableString *responseString = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
    NSError *error;
SBJSON *parserObject = [[SBJSON alloc] init];

Step 3 : a) Link1 – Response string has the json string
b) Link2 – Response string is empty

Step 4 : So, I have changed the code like following,

    NSMutableString *responseString = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];


    if (!(responseString))
    {
    responseString = [[NSMutableString alloc] initWithData:responseData encoding:NSASCIIStringEncoding];
    }
    NSError *error;
SBJSON *parserObject = [[SBJSON alloc] init]; 

Step 5 : Now the problem has been solved. But I can’t understand the problem here. Can anyone help me to understand this scenario

  • 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-15T01:12:41+00:00Added an answer on June 15, 2026 at 1:12 am

    It’s unclear how this is related to JSON. Your code snippets create SBJSON parser objects, but never use them.

    It is also hard to figure out why the initWithData calls are failing without seeing what the data looks like. My guess would be that the data includes byte sequences that are not valid UTF8, so decoding as UTF8 fails, but decoding as ASCII works because the “bad” characters are just treated as unknown single-byte characters.

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

Sidebar

Related Questions

This question deals with teamwork and emails. I'm facing the following scenario. I have
I have some confusion. Not really a bug or issue I am facing. I
Choices I am learning OOP PHP, but some things are really confusing. I have
I'm facing a really strange problem that has me smoked. I have a fairly
I'm facing a really perplexing problem.. I have a .Net 2.0 C# WinForms project.
I'm developing an JC2.2.1 applet. I'm facing a really strange problem. I have my
I am facing a really weird error,while trying to insert into a table called
I am facing a really tough time doing this. I haven't done much on
I'm currently facing a problem which I can not resolve and I really don't
issue facing while loading the messages in to mq channel, recieving an error like

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.