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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:13:23+00:00 2026-06-18T04:13:23+00:00

I just started dabbling with C#, and I’ve been banging my head over JSON

  • 0

I just started dabbling with C#, and I’ve been banging my head over JSON deserialization for a while now. I’m using Newtonsoft.Json library. I’m expecting just a json response of an array of dictionaries as such

[{"id":"669","content":" testing","comments":"","ups":"0","downs":"0"}, {"id":"482","content":" test2","comments":"","ups":"0","downs":"0"}]

Right now I have: (note: download is just a string holding the json string)

string[] arr = JsonConvert.DeserializeObject<string[]>(download);

I’ve tried many different ways of doing this, each failed. Is there a standard way for parsing json of this type?

  • 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-18T04:13:24+00:00Added an answer on June 18, 2026 at 4:13 am

    You have an array of objects not strings. Create a class that maps the properties and deserialize into that,

    public class MyClass {
        public string id { get; set; }
        public string content { get; set; }
        public string ups { get; set; }
        public string downs { get; set; }
    }
    
    MyClass[] result = JsonConvert.DeserializeObject<MyClass[]>(download);
    

    There are only a few basic types in JSON, but it is helpful to learn and recognize them. Objects, Arrays, strings, etc. http://www.json.org/ and http://www.w3schools.com/json/default.asp are good resources to get started. For example a string array in JSON would look like,

    ["One", "Two", "Three"]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started dabbling in google ape engine. Right now I'm using JDO with
Just started using JSON in iOS. I have a previous version of an application
just started dabbling in Android and have been told that Strings shouldnt be hard
Just started using log4net and trying to get my head around the config and
Just started using carrierwave with Rails and things have been going smoothly with one
just started using AndroidQuery for JSON asynchronous tasks and Im not familiar with JSON
Hey I just started dabbling with android programming, and from my short period of
Just started with JQuery and I've managed to pass a parameter using POST, firebug
Just started learning about SQL, and doing very basic stuff using SQLPlus. I've literally
Just started using VBA and I'm trying to access all the data in a

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.