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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:18:42+00:00 2026-05-26T23:18:42+00:00

Hi I am getting a response from server which is something like this {total:110,responses:{13:26,14:24,15:40,16:20}}

  • 0

Hi I am getting a response from server which is something like this

{"total":110,"responses":{"13":26,"14":24,"15":40,"16":20}}

I am not able to deserialize it using DataContractJSONSerializer. I have tried various combination for it but no results.
I am using following class for de-serializing:

public class PollResponseRoot
{
    public int total { get; set; }
    public Dictionary<int, int> Responses;

}

but I always get the Response value null. Please let me know where I am going wrong.

  • 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-26T23:18:42+00:00Added an answer on May 26, 2026 at 11:18 pm

    Dictionaries are not supported by DataContractJsonSerializer, you could try your luck with Json.Net instead.

    Also available on NuGet: http://nuget.org/List/Packages/Newtonsoft.Json

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

Sidebar

Related Questions

I am getting a response from server which I need to deserialize using protobuf.
I am getting this string from server in response, which is actually in arabic
I am getting data from server it gives in response a NSString which hase
I am getting some response from server side which i need to parse but
I am making a social app in which I am getting response from server
I am getting JSON response from the server..Inside that JSON string i am having
WebClient.DownloadStringAsync does cache the server response. After once getting a response from the server
I'm trying to POST a http request using ajax, but getting a response from
i am getting the JSON response like this : [ {IndexID:1,IndexName:Consumer Confidence Index(CCI),IndexValue:34.79,Month:10,PercentageChanged:0,Position:0,Year:2011}, {IndexID:1,IndexName:Consumer
I am getting response from server side in the form of json array.I need

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.