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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:51:52+00:00 2026-05-26T20:51:52+00:00

I am trying to deserialize a JSON string that was serialized by JSON.Net 4.0

  • 0

I am trying to deserialize a JSON string that was serialized by JSON.Net 4.0 r3 itself. The settings are the same for serialization and deserialization. The following exception occurs:

Could not find type
‘System.Collections.Generic.List`1[[System.Drawing.PointF,
System.Drawing]]’ in assembly ‘”mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089″‘

After turning on “stop when BindingFailure is thrown”, I see the problem is in the following part (JSON.Net source code, DefaultSerializationBinder.cs):

  if (assemblyName != null)
  {
    Assembly assembly;

#if !SILVERLIGHT && !PocketPC
    // look, I don't like using obsolete methods as much as you do but this is the only way
    // Assembly.Load won't check the GAC for a partial name
#pragma warning disable 618,612
    assembly = Assembly.LoadWithPartialName(assemblyName);
#pragma warning restore 618,612
#else
    assembly = Assembly.Load(assemblyName);
 #endif

    if (assembly == null)
      throw new JsonSerializationException("Could not load assembly '{0}'.".FormatWith(CultureInfo.InvariantCulture, assemblyName));

    Type type = assembly.GetType(typeName); // BindingFailure here
    if (type == null)
      throw new JsonSerializationException("Could not find type '{0}' in assembly '{1}'.".FormatWith(CultureInfo.InvariantCulture, typeName, assembly.FullName));
  }

The error shown at the point of BindingFailure is

The assembly with display name ‘System.Drawing’ failed to load in the
‘LoadFrom’ binding context of the AppDomain with ID 1. The cause of
the failure was: System.IO.FileNotFoundException: Could not load file
or assembly ‘System.Drawing’ or one of its dependencies. The system
cannot find the file specified.

The operating system is Windows 7, 64-bit. I am using Visual Studio 2010 and targeting this application for Framework v4. The target is not Silverlight or PocketPC.

Why would it fail to load “System.Drawing” in this case? Where should I start investigating whether this is a JSON.Net issue or a problem with my Framework 4.0 installation?

Thanks in advance.

  • 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-26T20:51:53+00:00Added an answer on May 26, 2026 at 8:51 pm

    It turns out the issue is related to JSON.Net. I used to use the following setting

    jsonSerializerSettings = new JsonSerializerSettings
    {
         TypeNameHandling = TypeNameHandling.All
    };
    

    This was because of a suggestion in a post (that involved deserializing generic collections like List). It was suggested that full type information would help with JSon.Net errors about the “Cannot instantiate abstract base classes” error message.

    If I change it to

    jsonSerializerSettings = new JsonSerializerSettings
    {
         TypeNameHandling = TypeNameHandling.Auto
    };
    

    it works fine. Interestingly, some type information does not get emitted, I do not get the BindingFailure and the deserialization works fine. I have no idea why it did not work with “Auto” in the first place.

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

Sidebar

Related Questions

I am trying to deserialize a JSON string for an iOS app that I
I am trying to deserialize a JSON string that looks like so: {'type':'clientlist','client_list':[]} I
I am trying to deserialize a JSON string using VB.net and cannot seem to
I'm trying to use JSON.Net to deserialize a JSON object into a C# object.
I'm trying to deserialize a relative simple JSON string, which looks like: [{ FacebookID:
here's my problem: I'm trying to deserialize json that hasn't been done by me.
I'm using Json.NET to deserialize a jQuery.post() JSON param. The raw value that's posted
I am trying to deserialize a JSON String like (extracted this bit to show
I'm trying to deserialize json to an object model where the collections are represented
I'm trying to deserialize an xml structure that looks like this: <somecontainer> <key1>Value1</key1> <key1>Value2</key1>

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.