Upgrading Newtonsoft.Json 3 to 4
Breaking3.5.8 → 4.5.11Breaking6Security2New88Changed35Fixed114Other2
BreakingUpgrade verdict
6 breaking changes and 2 security fixes.
In plain terms
- Two internal type-description helper types are no longer available.
- Code that catches the general Exception type may need to catch the new specific type instead.
- The setting that controls the culture used when reading values now lives on the base reader class instead of the text reader class.
- Code that uses JPropertyDescriptor must update its using statements.
Must act Top 5 of 8 that need code or config changes
What you must change
Breaking6
Removes JTypeDescriptionProvider and JTypeDesciptor.
JTypeDescriptionProviderJTypeDesciptorChanges instances of Exception to be a more specific exception.
ExceptionMoves the Culture property from JsonTextReader to JsonReader.
JsonTextReader.CultureJsonReader.CultureMoves JPropertyDescriptor to the Newtonsoft.Json.Linq namespace.
JPropertyDescriptorNewtonsoft.Json.LinqReplaces JSON schema Required with Optional, as defined in JSON schema spec 3.
RequiredOptionalReplaces JSON schema MaxDecimals with DivisibleBy, as defined in JSON schema spec 3.
MaxDecimalsDivisibleBySecurity2
Adds SecurityTransparent attribute to the WinRT build.
SecurityTransparentSerializing ISerializable types under partial trust now errors to fix a potential security issue.
ISerializable