Cannot create and populate list type System.Data.SqlClient.SqlErrorCollection. Path '$values'

217 Views Asked by At

We have been having troubles with deserializing sql exceptions using newtonsoft.net Version 11.0.2 On .Net 4.6.2 (Full)

We didn't have these issues before when we where on an earlier version of newtonsoft. (10.x)

Reproduction case in Gist

I have been searching around for how to fix this. But all i can find are solutions in which you decorate the offending property with an attribute. Which obviously is not a option here. Upgrading our .Net version is an option, but is non trivial for us. So im trying to find out if i have other options. Im not even sure that upgrading the .net version is going to fix this.

Update: I have been looking into using a custom ContractResolver to try and restore the old behavior, as suggested in the comments, however this does not work.

Upgrading to newtonsoft 12.0.3 also does not help. Upgrading to Net48 also does not help.

0

There are 0 best solutions below