This project has moved and is read-only. For the latest updates, please go here.


Breaking change in 4.5 release 2


We have a classes that were already marked by Serializable attribute because we need to support multiple serialization types, including Json. We use default JsonSerializer settings with no extra options. Serialized data with 4.5 release 2 are completely different and not compatible with previous serializer behavior. As a result application using 4.5 release 2 will return empty objects when deserializing data created by application with 4.5 release 1 or older. Same issue happens the other way around.
Can you please revert this to use the old behavior by default. Currently 4.5 release 1 and release 2 assemblies are indistinguishable in .NET (same version and it was explicitly stated that there will be no breaking changes between releases.
Closed Apr 13, 2012 at 3:12 PM by JamesNK
I've changed it so that Json.NET ignores the [Serializable] attribute by default in release 3. Post here if you still have any issues with it.


xgene wrote Apr 12, 2012 at 6:24 PM

I had a similar issue upon upgrading to 4.5.2. Classes marked with [Serializable] and delivered via a Web API class using as the serializer were munged:

With serializable attribute:
And without:
[{userId: "d58cb294-9831-4c76-bf66-420ed7a20c15",...

JamesNK wrote Apr 12, 2012 at 11:41 PM

Its something I had thought I had done in 4.5 r1 but it slipped to 4.5 r2. It might end up that the version number never changes again - strong naming plus a changing version number hurts a lot of people.
To work around the issue follow the instructions here -

JamesNK wrote Apr 12, 2012 at 11:53 PM

I'll have a think about this, I might default IgnoreSerializableAttribute to true.

wrote Apr 13, 2012 at 3:12 PM

wrote Feb 22, 2013 at 2:48 AM

wrote May 16, 2013 at 1:37 PM