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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:16:46+00:00 2026-06-08T18:16:46+00:00

I need an easy-to-setup JSON library for C# .NET that can work well with

  • 0

I need an easy-to-setup JSON library for C# .NET that can work well with strongly-typed Lists and Dictionaries. I’ve been working with fastJSON, which is lightweight and portable. However the methods ToJSON and ToObject do not always work with strongly typed objects such as List<string>. I need a simple library that can execute the following correctly:

// parse a JSON file
List<string> names = JSON.parse<List<string>>(json1);
Dictionary<string, int> ids = JSON.parse<Dictionary<string, int>>(json);

// stringify an object
string json = JSON.stringify(names);
string json = JSON.stringify(ids);

Obviously the ideal library should be fast (fast enough to scale to JSONs that are hundreds of MBs), and portable (small code, no dependencies), but no fusses. I’m pretty desperate right now so anything that works is fine.

  • 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-08T18:16:47+00:00Added an answer on June 8, 2026 at 6:16 pm

    http://james.newtonking.com/projects/json-net.aspx is the usual answer but there are many more.

            List<string> names = new List<string>() {"Mike","Joe","Jane"};
            Dictionary<string, int> ids = new Dictionary<string, int>()
                                              {
                                                  {"Mike",1},
                                                  {"Joe",2},
                                                  {"Jane",3},
                                              };
    
            // ["Mike","Joe","Jane"]
            string nameJson = Newtonsoft.Json.JsonConvert.SerializeObject(names);
    
            //{"Mike":1,"Joe":2,"Jane":3}
            string idsJSon = Newtonsoft.Json.JsonConvert.SerializeObject(ids);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think that is not easy to understand what I need reading title, so
What XML Parser Library can i use that is best for parsing XML Response
I'm using the Markdown library for PHP by Michel Fortin. Setup is easy and
I really need an easy to use build tool which supports multiple languages with
I'm using CodeIgniter and need an easy to implement captcha. Something simple, nothing too
I need to develop a easy web site, I usually use bootstrap CSS framework,
I need to find an easy way to know if the local machine's 'automatically
I need to Open a process (easy) and then somehow paste data from my
I need to provide our web developers an easy and quick way to test
I need recommendations from people whom have implemented an easy to use GWT editable

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.