DataContractJsonSerializer: Serialize objects
Create a C# program that serialize and deserialize objects in JSON format. To do this, you can use the
DataContractJsonSerializer class included in the
First implement a Person class with three properties (Name, Age and City). The City class will have two properties (Name and Population). Then create a person object and use the serializer of the
DataContractJsonSerializer object to save the data in file.json, later deserialize the file.json and print it on the screen. Remember to prepare a
ToString() method to print the Person class.