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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:56:59+00:00 2026-06-06T20:56:59+00:00

so I’m fairly new to programming but am looking to go much deeper with

  • 0

so I’m fairly new to programming but am looking to go much deeper with it. I recently started to get involved in a project to create a WinForm program for a website that uses an API system in JSON.

I’ve never used an API before so I’m not quite sure how it works but after looking at it for a few minutes I seem to have the gist of it. What I don’t get is how exactly parsing JSON in C# works.

I found
this link after a little google searching. And I got it working (somewhat) with this code.

static void Main(string[] args)
{
        WebClient c = new WebClient();
        var vLogin = c.DownloadString("https://www.openraid.us/index.php/api/login/username/password");
        //Returns string 
        //{"status":1,"error":null,"token":"250-1336515541-c48d354d96e06d488d1a2530071ef07c9532da26"} 
        //Token = random, no decisive length*/
        JObject o = JObject.Parse(vLogin);
        Console.WriteLine("Login Status: " + o["status"]);
        String sToken = "" + o["token"];
        Console.WriteLine(sToken);
        Console.WriteLine("");
        //Breaks after this
        var myRaids = c.DownloadString("https://www.openraid.us/index.php/api/myraids/"+sToken);
        JObject r = JObject.Parse(myRaids); //error occurs here
        String sEventId = "" + r["event_id"];
        Console.WriteLine("Event ID: " + sEventId);
        Console.ReadLine();
}

So to me it looks like I have parsing 1 page done and handled, but when I move onto the second I get this error.

Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path ”, line 1, position 1.

So I guess my question is, how do I parse more than 1 page or call of JSON and what would be the easiest way to break up each section of the JSON object (Such as status, error, and token, into C# strings?

  • 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-06T20:57:02+00:00Added an answer on June 6, 2026 at 8:57 pm

    Did you try to JArray instead? Depending on what kind of object you are trying to return

    WebClient client = new WebClient();
    var data = client.DownloadString("");
    var jArray = JArray.Parse(data);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but

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.