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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:52:41+00:00 2026-06-19T01:52:41+00:00

I have a JSON data string, which I retrieved online, through a webrequest. I

  • 0

I have a JSON data string, which I retrieved online, through a webrequest. I am trying to parse the string and map the data onto my data structure, which is not working…I have used the same method previously for other mappings as well, which worked well so far. But in this particular case, it is not working..

This is my JSON formatted string that is retrieved:

{"Item":{"FirstName":"Antônio","LastName":"da Silva","CommonName":null,"Height":"175","DateOfBirth":{"Year":"1978","Month":"6","Day":"13"},"PreferredFoot":"Left","ClubId":"1825","LeagueId":"20","NationId":"54","Rating":"70","Attribute1":"53","Attribute2":"68","Attribute3":"74","Attribute4":"73","Attribute5":"55","Attribute6":"56","Rare":"1","ItemType":"PlayerM"}}

This is my class which parses the string:

public class ParsePlayerInfo
{
    private PlayerClass playerInfo;

    public PlayerClass parse(string stringToParse)
    {
        JavaScriptSerializer serializer = new JavaScriptSerializer();
        if ((stringToParse != null) && (stringToParse.Length > 0))
        {
            this.playerInfo = serializer.Deserialize<PlayerClass>(stringToParse);
        }
        return this.playerInfo;
    }
}

This is my Player class:

public class PlayerClass
{
    public PlayerClass()
    {
        this.Player = new PlayerContents();
    }

    public PlayerContents Player { get; set; }
}

This is my class of playercontent:

public class PlayerContents
{
    public PlayerContents()
    {
        string str;
        this.ItemType = str = "";
        this.Rare = str = str;
        this.Attribute6 = str = str;
        this.Attribute5 = str = str;
        this.Attribute4 = str = str;
        this.Attribute3 = str = str;
        this.Attribute2 = str = str;
        this.Attribute1 = str = str;
        this.Rating = str = str;
        this.NationId = str = str;
        this.LeagueId = str = str;
        this.ClubId = str = str;
        this.PreferredFoot = str = str;
        this.Height = str = str;
        this.CommonName = str = str;
        this.FirstName = this.LastName = str;
        this.DateOfBirth = new DOB();
    }

    public string Attribute1 { get; set; }

    public string Attribute2 { get; set; }

    public string Attribute3 { get; set; }

    public string Attribute4 { get; set; }

    public string Attribute5 { get; set; }

    public string Attribute6 { get; set; }

    public string ClubId { get; set; }

    public string CommonName { get; set; }

    public DOB DateOfBirth { get; set; }

    public string FirstName { get; set; }

    public string Height { get; set; }

    public string ItemType { get; set; }

    public string LastName { get; set; }

    public string LeagueId { get; set; }

    public string NationId { get; set; }

    public string PreferredFoot { get; set; }

    public string Rare { get; set; }

    public string Rating { get; set; }
}

EDIT:

This is my DOB class:

public class DOB
{
    public DOB()
    {
        this.Year = this.Month = this.Day;
    }

    public string Day { get; set; }

    public string Month { get; set; }

    public string Year { get; set; }
}

any ideas?

  • 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-19T01:52:43+00:00Added an answer on June 19, 2026 at 1:52 am

    try renaming your Player property to match the property in JSON, i.e Item

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

Sidebar

Related Questions

I am getting JSON string from website. I have data which looks like this
I have a JSON-like data structure (which I don't want to change) that is
I have JSON data which contents Strings and Image URLs, and I already parse
I have json data saved as a string in a database. The structure of
I have a JSON data store used for a combobox selection which is working
I have 5 view which have deferent json data , in all my 5
So I have this JSON, which then my activity retrieves to a string: {popular:
I am trying to retrieve data with JSON from my database and parse them
I have a JSON string which includes a function I need to call. My
I am facing an issue in parsing a JSON data which is retrieved from

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.