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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -