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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:35:10+00:00 2026-05-19T22:35:10+00:00

I am using c#. Now I am looking to create a JSONHelper class, which

  • 0

I am using c#.

Now I am looking to create a “JSONHelper” class, which will Serialize and Deserialize the JSON string data. In my current scenario, I am getting below format string from my web-service which returns JSON type.

I have got a method in my C# code which calls a web-service method, which returns the string JSON type data. See below example.

string userDetails = myWebService.GetMember(username, Password, out Result);

so userDetails value is

{"FullName":"Manoj Singh","username":"Manoj","Miles":2220,"TierStatus":"Gold","TierMiles":23230,"MilesExpiry":12223,"ExpiryDate":"31 January 2011","PersonID":232323,"AccessToken":"sfs23232s232","ActiveCardNo":"232323223"}

Now I want to write JSONHelper Class in which there will be methods to Serialize and Deserialize the string type of JSON, and will return the dictionary type of values.

  • 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-19T22:35:11+00:00Added an answer on May 19, 2026 at 10:35 pm

    You can use the JavaScriptSerializer class in the System.Web.Script.Serialization namespace:

    JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
    object result = jsonSerializer.DeserializeObject(jsonString);
    

    Assuming your jsonString represents a object this should return a dictionary. But you will need to check the type carefully as there is no guarantee it won’t return an IEnumerable for example if you give it a json list.

    Better still you can use a strongly type deserialization:

    http://pietschsoft.com/post/2008/02/NET-35-JSON-Serialization-using-the-DataContractJsonSerializer.aspx

    If you know the return signature of your web method this is a far better solution.

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

Sidebar

Related Questions

I am looking to create a QTcpServer using PyQt that can simultaneously return data
I am fetching the current date & time using NOW() in mysql. I want
I am using PHP and I am looking to create links within my text
I need to create good looking lightning using OpenGL ES 1.1 (iPhone) and was
I am now diving into boost::iostreams and I'm looking for a way to create
For the current Android application I'm working on, I'm looking to create a tcp
I am looking to create a dictionary type of object from below string without
I'm looking to create a rich-featured application using a client/server model, using WCF as
Until now, I have not create any massive applications using ASP.Net. However, I am
I'm currently looking to create a directory on Linux using Python v2.7 with the

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.