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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:47:25+00:00 2026-06-09T10:47:25+00:00

I am working on deserializing data passed to a Microsoft Web API in MVC4

  • 0

I am working on deserializing data passed to a Microsoft Web API in MVC4 RC into objects of the following class:

public class EditorCreateEditSubmission
{
    public string action { get; set; }
    public string table { get; set; }
    public string id { get; set; }
    public Dictionary<string, string> data { get; set; }
}

Whenever a Web API method gets data which should map to the EditorCreateEditSubmission, the “data” field is empty, like so:

Empty data

(It’s okay for Table and ID to be empty)

My controller method:

public EditorServerResponse Post(EditorCreateEditSubmission ajaxSubmission)
{
//...Handle data
}

The raw header:

POST http://localhost:64619/API/Species HTTP/1.1
Accept: application/json, text/javascript, */*; q=0.01
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://localhost:64619/Manage/Species
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Host: localhost:64619
Content-Length: 134
Connection: Keep-Alive
Pragma: no-cache

action=create&table=&id=&data%5Bamu%5D=1&data%5BchemicalFormula%5D=H&data%5BcommonName%5D=Hydrogen&data%5Bstatus%5D=N&data%5Bnotes%5D=

More readable view:

action  create
table   
id  
data[amu]   1
data[chemicalFormula]   H
data[commonName]    Hydrogen
data[status]    N
data[notes] 

Do I need to manually create a class with get/set values every possible set of incoming values? It seems like deserialization of this data into a Dictionary should be straightforward, but I’m having some difficulty finding examples inthe new RC release of Microsoft’s MVC4.

  • 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-09T10:47:26+00:00Added an answer on June 9, 2026 at 10:47 am

    I don’t think that the FormUrlEncodedMediaTypeFormatter does handle this.

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

Sidebar

Related Questions

I'm working with asmx webservices and serializing/deserializing a lot of data through them for
The following class diagram is a simplified version of a project I'm working on.
Working on a mobile app that needs to use a public API for accessing
Working with an undisclosed API, I found a function that can set the number
I'm working with an API that uses json. I have some classes that I've
I'm having a problem with deserializing a json string to a dictionary. I'm using
The following code throws a NewtonSoft.JSON.JsonSerializationException {Unexpected token when deserializing object: StartObject. Line 1,
Working on a website http://www.ArenaText.com written in asp.net with Microsoft AJAX control toolkit. iPad
Working with an API where I need to send a value over in an
I am currently deserializing JSON using XStream, and it has been working great. However,

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.