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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:56:23+00:00 2026-05-15T21:56:23+00:00

For some reason the following JSON string creates the correct number of records in

  • 0

For some reason the following JSON string creates the correct number of records in the custom objects array, but does NOT populate the objects in the array with and values. Help appreciated!

JSON String

{ 
"Grids": [{ "CommitImporterGrid": {"CostDivisionCode": "DL", "CostDivisionKey": 5, "CostDivisionName": "Direct Labor", "SourceType": "Contractor", "CommitDollars": 202, "CommitHours": 113.12, "PercentComplete": 50.00, "TaxRate": 0, "IohRate": 0.01, "ConditionerRate": 0}}],
"ProjectKey": 571, 
"AsOf": "1/1/2008 11:59:59 PM", 
"WbsKey": 1327, 
"FcrGroupKey": 26, 
"ContractorKey": 11
}

The Deserializer

protected void btnSave_Click(object sender, EventArgs e)
{
    JavaScriptSerializer serializer = new JavaScriptSerializer();
    JsonViewer view = serializer.Deserialize<JsonViewer>(txtJson.Value);

    // The LIST in the "view" object HAS records, but NO DATA?
}

The Custom Classes

public class JsonViewer
{
    public JsonViewer()
    { }

    public List<CommitImporterGrid> Grids { get; set; }

    public Int32 ProjectKey { get; set; }
    public String AsOf { get; set; }
    public Int32 WbsKey { get; set; }
    public Int32 FcrGroupKey { get; set; }
    public Int32 ContractorKey { get; set; } 
}



public class CommitImporterGrid
        {
            public CommitImporterGrid()
            { }

            public String CostDivisionCode { get; set; } 
            public Int32 CostDivisionKey { get; set; } 
            public String CostDivisionName { get; set; } 
            public String SourceType { get; set; } 
            public Decimal CommitDollars { get; set; } 
            public Decimal CommitHours { get; set; } 
            public Decimal PercentComplete { get; set; } 
            public Decimal TaxRate { get; set; } 
            public Decimal IohRate { get; set; } 
            public Decimal ConditionerRate { get; set; } 
        }
  • 1 1 Answer
  • 2 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-15T21:56:23+00:00Added an answer on May 15, 2026 at 9:56 pm

    Old: (Bad)

    {
        "Grids": [
            { 
                "CommitImporterGrid": 
                {
                    "CostDivisionCode": "DL", 
                    "CostDivisionKey": 5, 
                    "CostDivisionName": "Direct Labor", 
                    "SourceType": "Contractor", 
                    "CommitDollars": 202, 
                    "CommitHours": 113.12, 
                    "PercentComplete": 50.00, 
                    "TaxRate": 0, 
                    "IohRate": 0.01, 
                    "ConditionerRate": 0
                }
            }
        ],
        "ProjectKey": 571,
        "AsOf": "1/1/2008 11:59:59 PM",
        "WbsKey": 1327,
        "FcrGroupKey": 26,
        "ContractorKey": 11
    }
    

    New:

    {
        "Grids": [
            { 
                "CostDivisionCode": "DL", 
                "CostDivisionKey": 5, 
                "CostDivisionName": "Direct Labor", 
                "SourceType": "Contractor", 
                "CommitDollars": 202, 
                "CommitHours": 113.12, 
                "PercentComplete": 50.00, 
                "TaxRate": 0, 
                "IohRate": 0.01, 
                "ConditionerRate": 0
            }
        ],
        "ProjectKey": 571,
        "AsOf": "1/1/2008 11:59:59 PM",
        "WbsKey": 1327,
        "FcrGroupKey": 26,
        "ContractorKey": 11
    }
    

    The person above me has the explanation, thought i would show you the correct JSON though.

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

Sidebar

Related Questions

I have the following JSON data being returned, but for some reason, Javascript or
For some reason the following doesn't crash like my program does, but I'm pretty
For some reason, I am not entirely sure why, but the following is not
I have a following program but for some reason it is throwing an error
For some reasons this part where I fetch JSON data from following url will
For some reason the following code doesn't work on Windows XP. new URL(file:// +
For some reason the following form isn't submitting the file like it should and
For some reason it looks like constructor delegation doesn't work in the following snippet:
For some reason, the following code never calls Event::Event(Event&& e) Event a; Event b;
I'm new to Javascript and for some reason I can't get the following code

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.