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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:48:08+00:00 2026-06-05T04:48:08+00:00

My Json string: jsonString ={GetStatusResult:[{CaseCompleteInd:N,CaseNbr:999999,InSurgeryNowInd:Y,InRoomNowInd:N}]}; My classes: public class GetStatusResult { public List<CaseModel> caseDetails

  • 0

My Json string:

    jsonString ="{"GetStatusResult":[{"CaseCompleteInd":"N","CaseNbr":"999999","InSurgeryNowInd":"Y","InRoomNowInd":"N"}]}";

My classes:

public class GetStatusResult
{
    public List<CaseModel> caseDetails { get; set; }
}

public class CaseModel
{
    public string CaseCompleteInd { get; set; }
    public string CaseConfirmNbr { get; set; }

    public string InSurgeryNowInd { get; set; }
    public string InRoomNowInd{ get; set; }
}

}

My code:

    GetStatusResult caseInfo = new GetStatusResult();

    JavaScriptSerializer jsSerializer = new JavaScriptSerializer();

    caseInfo = jsSerializer.Deserialize<GetStatusResult>(jsonString);

My Problem:

The object is always returning as NULL and the CaseModel details are not being populated. The JSON string obviously has data, but I feel that my class structure is somehow messed up with the root level class. It appears similar to other examples posted here and elsewhere, so I’m at a loss right now. Any help is greatly appreciated.

  • 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-05T04:48:09+00:00Added an answer on June 5, 2026 at 4:48 am

    If you modify your JSON string to

    jsonString ="{"caseDetails":[{"CaseCompleteInd":"N","CaseNbr":"999999","InSurgeryNowInd":"Y","InRoomNowInd":"N"}]}";
    

    then it should work.

    Properties of JSON object correspond to the properties of .NET object having the same name.

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

Sidebar

Related Questions

To deserialise JSON string to a list of class, different ways listed at StackOverflow
I'm converting a list of Foo objects to a JSON string. I need to
I am trying to deserialize the json string in C#. Following is jsonstring and
I'm using Gson to convert a class containing two GeoPoints to a JSON string.
I have the following JSON String. var jsonString = '{J:4,0:M, J:5,0:N}' If I parse
Consider the following example: public class BaseClass { public string StringInBaseClass {get;set;} public int
I have a JSON string as : var jsonString = JSON.stringify(dataObject); document.getElementById(hdnChromedata).value = jsonString;
I'm trying to serialize scala case class to JSON string using Jerkson like this:
Below is my json string, which i am trying to parse to list of
I'm trying to deserialize a JSON string with the following syntax into C# classes,

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.