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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:23:07+00:00 2026-05-24T22:23:07+00:00

I want to split the json part from this URL in my iPhone application.

  • 0

I want to split the json part from this URL in my iPhone application.

http://vkontakte.ru/login_success.html#session={“expire”:”1272008089″,”mid”:”100172″,”secret”:”9c8d8f0305″,”sid”:”1131703552161ae352a1256402e3140d7cbde41b1602a93d15472c82″}

I tried and and saved the JSON into a NSString but what i am getting is

http://vkontakte.ru/api/login_success.html?session=%7B%22mid%22:113158415,%22secret%22:%227ce58bfcd3%22,%22sid%22:%2203831b43c1bb992f9477efbfe96e83f6ecff1c1b661315ac0a20719cf57a44%22,%22expire%22:0%7D

This is not coming in JSOn Format. Below is my code

- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {

    NSURL *url = [request URL];
    NSError* error;
    NSLog (@"json path %@",url);
    SBJsonParser *parser = [[SBJsonParser alloc] init];
    NSURLRequest *request1 = [NSURLRequest requestWithURL:url];
    NSString *json_string = [url absoluteString];
    NSArray *arr = [json_string componentsSeparatedByString:@"="];
    json_string = [arr objectAtIndex:1];
        // parse the JSON response into an object
        // Here we're using NSArray since we're parsing an array of JSON status objects
    NSArray *statuses = [json_string JSONValue];

    NSLog(@"%@",error);

        // Each element in statuses is a single status
        // represented as a NSDictionary
        for (NSDictionary *status in statuses)
        {
            // You can retrieve individual values using objectForKey on the status NSDictionary
            // This will print the tweet and username to the console
            NSLog(@"%@ - %@", [status objectForKey:@"secret "], [[status objectForKey:@"mid"] objectForKey:@"sid"]);
        }
        return YES;
}

How can move further?

  • 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-24T22:23:07+00:00Added an answer on May 24, 2026 at 10:23 pm

    Try replacing:

    NSString *json_string = [url absoluteString];

    with

    NSString *json_string = [[url absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];.

    That’s a really strange thing you’re doing, though. Why does the URL have JSON in it?

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

Sidebar

Related Questions

I want to split a string like this: abc//def//ghi into a part before and
We want to split our large asp.net mvc web application into multiple Visual Studio
I want to split a file containg HTTP response into two files: one containing
I want to split the /n from my string in Java. For example, I
In my Android application I make a HTTP POST connection: serverresponse = CustomHttpClient.executeHttpPost(url, postParameters);
I want to split an arithmetic expression into tokens, to convert it into RPN.
I want to split a command line like string in single string parameters. How
I want to split up the jQuery .js file into two, but I have
I want to split alpha-numeric (with space) and non-alpha-numeric by comma in a string.
I want to split value. $value = code1.code2.code3.code4(code5.code6(arg1.arg2, arg3), code7.code8); I want to split

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.