Carolina Firsts look to their next step As more than 600 first-generation students prepare to graduate from the University of North Carolina at Chapel Hill and celebrate years of hard work, they â¦. Read More Â». More Spotlight Stories. How costumes unfold Eliza Doolittle strolls in.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object.
Re: serialize and deserialize c# class into string. Jun 22, 2011 08:22 AM |chronos123 |LINK. thank you very much for your help, i appreciate it very much! you are most right, i only created this code to show an example(and i wrote in this post), and yes its missing serialize and initialize of the list.e: serialize and deserialize c# class into string. Jun 21, 2011 01:35 PM |Knecke |LINK. Its impossible to say without seeing more code. When you deserialize a string, that does not contain the same type as you are trying to cast to.