c# - DataContractJsonSerializer : unserializing an object which can be a string or an object -


I currently get some data from an API which sends me an array Object "Paramaze" first element contains a string But an object is second.

My data contract looks like this:

  [DataMember (name = "parametry")] string absolute; [Datamember (name = "parameter")] param jusan absolute 2;   

(ParamsJson is just a string of datamail).

I have read Jason Net or Newton can solve my problem, but I really want to solve without adding a new library.

I can find a solution that will work.

Instead of a double declaration, it is better to list all types in a calculation.

Comments

Popular posts from this blog

sonata admin - how to add ManyToOne property field in configureListfield in sonataAdmin -

wpf - ControlTemplate with changes for every class -

sql - Return Function using Cursor -