I have a DataTable
which has only a single row and looks like
America | Africa | Japan |
----------
Like Gazzi said you should include the NewtonSoft.Json library it is included in Visual Studio.
To get an object similar to what you have described you should create a data model like Country.cs which would look like this.
[Serializable]
public class CountryModel {
public int ID { get; set; }
public string Title { get; set; }
public List Values { get; set; }
}
[Serializable]
public class ValueModel {
public int ValueID { get; set; }
public string Type { get; set; }
}
Create a helper function to convert your table data to these models. You can then serialize/deserialize data as need using the Newtonsoft Library.