Serialization C# with Example



Serialization C# with Example

static void Main(string[] args) 
{ 
Book[] books = new Book[3]; 
Author author = new Author(89,"Aldous Huxley","Author",books); 
string objectDeserialized = JsonConvert.SerializeObject(author); 
//Converting author into json 
} 
The method ".SerializeObject" receives as parameter a type object, so you can put anything into it. 

0 Comment's

Comment Form

Submit Comment