Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Deserialize and Entity in Json throwing error for Attributes as its now Abstract

$
0
0

Hi All

I am sure I have built solutions before that use json to serialize and deserialize the Entity object. Using the newer Nuget package Microsoft.PowerPlatform.Dataverse.Client in .net 7 I am finding that I cannot deserialize specifically I get the error:

"System.NotSupportedException: The collection type 'Microsoft.Xrm.Sdk.DataCollection`2[System.String,System.Object]' is abstract, an interface, or is read only, and could not be instantiated and populated."

The AttributeCollection in this library is:

[Serializable]
    public abstract class DataCollection<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
    {
    .....
    }

I am sure that this collectio was not abstract in the full .net framework version hence the new issue. Is there a simple way around this to achieve the desired outcome?

Thanks in advance

Nick


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>