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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:25:03+00:00 2026-06-14T05:25:03+00:00

I am using the QuickDialog library, which is awesome! I managed so far to

  • 0

I am using the QuickDialog library, which is awesome!
I managed so far to place a json file into my project and display it.
But know I want to read it from a webservice. But the function takes a string. You can see the function over here.

- (QRootElement *)initWithJSONFile:(NSString *)jsonPath {
    self = [self initWithJSONFile:jsonPath andData:nil];
    return self;
}

What I do is the following.

[sectionSamples addElement:[[QRootElement alloc] initWithJSONFile:@"loginform"]];
[sectionSamples addElement:[[QRootElement alloc] initWithJSONFile:[NSURL URLWithString:[NSString stringWithFormat:@"%@",@"http://192.168.0.102/testWeb/callback2.json"]]]];

Like you can see my first element just loads a json (loginform) in that is located somewhere in my project. But when I want the second form (callback2.json) to load in. It says dataparameter is nil .

When I browse to the url in my browser it is correctly displaying it.

Can anybody help me?

Kind regards.

  • 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-14T05:25:05+00:00Added an answer on June 14, 2026 at 5:25 am

    Ok, so the solution was to maken an override of the function initWithJsonFile, which takes an NSURL as parameter.

    - (QRootElement *)initWithJSONURL:(NSURL *)jsonPath andData:(id)data{
    
        Class JSONSerialization = [QRootElement JSONParserClass];
        NSAssert(JSONSerialization != NULL, @"No JSON serializer available!");
    
        NSError *jsonParsingError = nil;
        //NSString *filePath = [[NSBundle mainBundle] pathForResource:jsonPath ofType:@"json"];
        NSDictionary *jsonRoot = [JSONSerialization JSONObjectWithData:[NSData dataWithContentsOfURL:jsonPath] options:0 error:&jsonParsingError];
    
        self = [self initWithJSON:jsonRoot andData:data];
        return self;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using C#.NET, i wrote a toolbar which is stored now into toolbar.cs file. I
Using MVVM. I have a DataTemplate which I am using to display an expander
Using NSDateComponents I know how to get the day component, but this gives me
Using JNotify in project and it fulfill my all requirements, but some times it
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
Using mercurial, I've run into an odd problem where a line from one committer
Using MVC2 I have an AJAX form which is posting to a bound model.
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
(Using MVC 2) From inside my controller action, I need to display the url:
Using NLTK and WordNet , how do I convert simple tense verb into its

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.