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.
First of all we'll define an interface for the Serializer. Next we'll implement a sample Json Serializer using the DataContractJsonSerializer. Next we define the enum, which we want to serialize and deserialize to JSON. And then we'll define the class, that uses the SampleEnum.