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

  • Home
  • SEARCH
  • 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 8019265

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:20:27+00:00 2026-06-04T21:20:27+00:00

Swapping out the standard serializer for the JSON.NET serializer is a non-issue. Code below

  • 0

Swapping out the standard serializer for the JSON.NET serializer is a non-issue. Code below was taken directly out of Scott Hanselman’s blog

http://www.hanselman.com/blog/OnTheNightmareThatIsJSONDatesPlusJSONNETAndASPNETWebAPI.aspx

JsonSerializerSettings serializerSettings = new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore };
serializerSettings.Converters.Add(new IsoDateTimeConverter());
GlobalConfiguration.Configuration.Formatters[0] = new JsonNetFormatter(serializerSettings);

However, after doing this I can’t save anything, ajax call fails. The error that I get back is:

This DataController does not support operation ‘Insert’ for entity ‘JObject’.

JObject is what is being returned from the JSON.NET serializer. It isn’t honoring the “__type” property that is being attached to the entity.

Example JSON:

[{"Id":"0","Operation":1,"Entity":{"__type":"Product:#Catalog.Models","Sku":"adsfadsf"}}]

Is there anything that I can do short of dipping into the JSON.NET source code to fix this? Is there an update coming to the ASP.NET MVC 4 Beta that will fix this?

  • 0 0 Answers
  • 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-04T21:20:28+00:00Added an answer on June 4, 2026 at 9:20 pm

    ASP.NET MVC 4 is still in beta and there are several features that don’t quite work 100% yet. The last time I checked the integration of Newtonsoft.Json and the JsonSerializer is not complete. After talking with some folks on the ASP.NET team it is my understanding that it is being worked on but there are no timelines for completion.

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

Sidebar

Related Questions

how can i use jQuery to show/hide the same div area... essentially swapping out
I am having an issue with swapping images in IE6. Works fine in all
I realise it's an early release and unstable. I wouldn't dream of swapping out
I've been swapping out connectionstrings wholesale wtih xlst for a while thusly <xsl:template match=/configuration/connectionStrings/add[@name='SybaseDB']/@connectionString
I have some images I am swapping out in a image widget by setUrl.The
I'm swapping out a derby database for a MySQL one. I had everything working
Out of interest: In ASP.net MVC you can roll your own ControllerFactory. I just
I can find plenty of documentation on swapping out views in a window, but
When promoting or deploying a build, I'd like to automate swapping out a single
A simple 2 dimensional array allows swapping rows (or columns) in a matrix in

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.