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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:01:20+00:00 2026-06-05T17:01:20+00:00

This is the structure of my JSON: string sample = [{‘Disp_Name’:’avi garg’, ’emailId’:’avi@india.com’, ‘fName’:’avi’,

  • 0

This is the structure of my JSON:

string sample = 
    "[{'Disp_Name':'avi garg',
       'emailId':'avi@india.com',
       'fName':'avi',
       'lName':'garg',
       'ph':{'number':'9813612344(Mobile)','type':1}
      },
      {'Disp_Name':'monk gup',
       'emailId':'mon@india.com',
       'fName':'monk',
       'lName':'gup',
       'ph':{'number':'01127243480(home)','type':2}
      }]";

And I want to deserialize it back to an object array of my class. Can anyone please help me out in doing that? I would like to use datacontractjsonserializer preferably but others are also fine.

Thanking you

  • 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-05T17:01:23+00:00Added an answer on June 5, 2026 at 5:01 pm
    public static List<your class> decrypt_json(string json)
        {
            var deserializedUser = new List<your class>();
            MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(json));
            DataContractJsonSerializer ser=new DataContractJsonSerializer(deserializedUser.GetType());
            deserializedUser =  ser.ReadObject(ms) as List<your class>;
            MessageBox.Show(deserializedUser.Count().ToString());
            ms.Close();
            return deserializedUser;       
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data and need to create a json file with this structure
How do you parse a JSON structure such as this properties: { /base/pinball/pinball_machine_basis/pinball_machines: {
I need to transform my nested sets structure (mysql) into json for this spacetree
I have a User object with this structure: class User { private String id;
The string is like so: [{Id:287,Name:aaaaaaaa,ProjectType:GP}, ... snip ...] This STRING is not JSON
I've got a JSON string that I want to convert to a Map structure
I've been trying to send a JSON string to PHP server like this: $.ajax({
In my controller, I get a string that is JSON: String json_string = this.Request.Content.ReadAsStringAsync().Result;
I have a JSON string (from PHP's json_encode() that looks like this: [{id: 1,
Suppose I have a json string like this: { ... key1:value1; ... } with

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.